Can you add padding=1 in all conv2d like this
self.decoder = nn.Sequential(
            nn.Conv2d(1, 64, 3, padding=1),
            nn.Conv2d(64, 64, 3, padding=1),
            nn.Upsample(scale_factor=5, mode='bicubic'),
            nn.ReLU(),
            nn.Conv2d(64, 128, 3, padding=1),
            nn.Conv2d(128, 128, 3, padding=1),
            nn.Upsample(scale_factor=5, mode='bicubic'),
            nn.ReLU(),
            nn.Conv2d(128, 256, 3, padding=1),
            nn.Conv2d(256, 256, 3, padding=1),
            nn.ReLU(),
            nn.Conv2d(256, 512, 3, padding=1),
            nn.Conv2d(512, 512, 3, padding=1),
            nn.Upsample(scale_factor=2.5, mode='bicubic'),
            nn.ReLU(),
            nn.Conv2d(512, 1024, 3, padding=1),
            nn.Conv2d(1024, 1024, 3, padding=1),
            nn.ReLU(),
            nn.Conv2d(1024, 2048, 3, padding=1),
            nn.Conv2d(2048, 3, 3, padding=1)
        )

Basically, a simple rule of thumb is
output_size(height or width) = input_size - kernel_size + 2 * padding + 1
Of course, the equation is more complicated when you use strided or dilated convolutions.
So, in each conv layer your are reducing the feature map size when you don’t use the padding and hence not achieving the 62.5 times (5 * 5 * 2.5) upsampling you need to go from 8x8 to 500x500.