Not towards the brain.
Look at the two diagrams. The temporal artery is a branch of the external carotid artery that stays outside the skull. The internal carotid artery goes inside the skull.
You couldn't compress the skull with sunglasses if you tried.
MANY headaches are related to muscular/tendinous pain in the head and neck, not the brain. Putting pressure on the temporal regions can cause pain in the muscles, and sustained pressure can cause spasms. Restricting the flow through the arteries of your face could in theory reduce flow to muscles of your scalp, causing pain and ischemia. It is less likely to be the cause of pain from sunglasses pressure, as there is lots of collateral blood flow, but not impossible.
Note that transmitting any force through the actual skull via compression, which is a pretty solid bone, would take a great deal of pressure (orders of magnitude above what sunglasses are capable of) and would involve fracturing bone. Then you'd be looking at potential stroke/TBI symptoms. That is not happening to you.
I am not going to discuss your symptoms of confusion, that starts down the path of individual medical advice. If you are concerned about any of your symptoms, see a doctor.
Get some better sunglasses or fix the hinges.