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.