It depends a bit what the dimensions represent.
If dim0 is the batch dimension and you are only dealing with a single feature, you could try to use transposed convolutions to upsample the single sample.
On the other hand, if both dimensions represent some kind of features, you could try to reshape the input to e.g. an image tensor of [batch_size, 1, 8, 5] and create a custom CNN which could deal with these tiny images.
Note that CNNs try to use the spatial features of your data. If your data doesn’t contain any correlation between neighboring values, I would rather stick to linear layers.