nn.Upsample will consider the channel dimension, which in pytorch is the dimension in second index.
The channel dimension will not be doubled, but the dimension after this will be doubled, which are height and weight dim. This is based on the following notation
(Batch_dim, Channel_dim, Height_dim, Width_dim)
In your problem, adding the channel dimension would be enough
u = nn.Upsample(scale_factor=2)
t = torch.randn([1, 1, 28, 28])
print(u(t).shape) # output shape is [1, 1, 56, 56]
If you dont want channel dimension, you can get away with using view to add channel dim