The error seems wrong for an input of [batch_size, 3, 224, 224], but you will get a shape mismatch in the linear layer, as your shape calculation is a bit wrong.
Since you are not using any padding in your conv layers, the spatial size will be smaller than given by your comments. These are the shapes after each pooling layer:
torch.Size([1, 64, 111, 111])
torch.Size([1, 128, 54, 54])
torch.Size([1, 256, 26, 26])
torch.Size([1, 256, 12, 12])
torch.Size([1, 512, 5, 5])

Changing the number of input features to 512*5*5 seems to work.