Your model architecture looks good and also the debugging steps printing the shapes are great.
The issue is raised because you are not flattening the activation tensor via x = x.view(x.size(0), -1) before passing it to self.fc1. Add this line of code and it should work.