There are of course multiple ways of achieving the desired output shape and this would be one:
x = torch.randn(32, 5)
x = x.unsqueeze(2).unsqueeze(2)

model = nn.Sequential(
    nn.ConvTranspose2d(5, 2, (2, 2), 2),
    nn.ConvTranspose2d(2, 2, (2, 4), 2),
    nn.ConvTranspose2d(2, 2, (2, 3), 2),
    nn.ConvTranspose2d(2, 2, (1, 3), 2),
)

out = model(x)
print(out.shape)
> torch.Size([32, 2, 15, 27])