I remember this once happening to me. I had managed to scramble the true labels so that the expected accuracy really was just one out of ten for a $90\%$ error rate. MNIST is pretty easy to solve with quite high accuracy, and while overfitting could happen, your model is so simple that I would suspect a coding error that has scrambled your test set categories, not a major issue with the model performance.