vgg19_bn uses the model.classifier attribute for the last classification block, while ResNets use model.fc.
You are currently freezing the complete model and assign a new attribute named fc with the nn.Sequential block.
Change it to
transfer_model.classifier = nn.Sequential(nn.Linear(25088, 500),
nn.ReLU(),                                 
nn.Dropout(), nn.Linear(500,num_classes))

and it should work.
PS: I also changed the in_features to 25088, as vgg19_bn expects this number of input features for the standard input shape of [batch_size, 3, 224, 224].