According to what I know, before the eye exam, the doctor will use some special eye drops to paralyze your the muscle around your eyes in order to let your pupils dilated, so that they could be able to better examine your eyes' problems, generally speaking, the impact would last for 5 hours or so, and you may have some uncomfortable feelings, but they are just ok!
When you do the eye exam, you will have the naked eyes to do the exam, wearing no contact lenses. Your eyes will be given the eye drops to put the eyes at the stable state for the further examination. However, when your eyes get dilated, it may mean that there is the problem for your health. Your eyes may get the stimulation from the eye drops because of the inner infection. Thus, you'd better go to the hospital to have a full check on the whole body to see whether there exists the problem that can be related with your eyes.
Well, in my opinion, it can be because of the eye pain you have got when you are in the eye exam. Generally speaking, when you have an eye exam, it will make your eyes focus on the points for a long time. And then the light can go through your eyes to check it. In this way, it can lead eye strain. And then lead to eye pressure. As we know that eye pressure can lead to dilate pupils. So that is the reason. Also, hyperventilation, muscle tensions are also the most common causes to dilated pupils. But maybe it can be fine in a few days. So you should not worry about it.