Yeah, but that's because your eyelids would be twitching and your temporal muscles contracting in response to to flash. When it's IR you can't see it so your body doesn't do anything in response.
IR light is, in general, very low-energy. Individual photons don't carry enough energy to disturb chemical bonds. The "flash" you're seeing there is less bright than a candle. The flickering not bright at all it's just that CCDs are very good at picking IR light up.
No part of your body can sense or respond to this and even if they did it wouldn't cause soreness.
The IR "flash" you filmed with your phone is about as bright as a television remote control. It's literally impossible that this is causing headaches.
Your headaches come from looking at an illuminated object in a darkish room that's only a few feet from your eyes. Screens in the dark cause eyestrain.
The darker an environment is the more open your pupil is. This reduces the pin-hole focusing effect of the pupil and requires that the lens of the eye be more carefully focused to see. Focusing that tightly is difficult because the lens muscles have to stay in one level of contraction for a long time.
Your body instinctively tries to squint so that the eyelids being close together and the eyelashes will cause a pinhole effect that will help you see. The fight between squinting for focus and opening your eyelids to make things less dark makes your head sore and causes tension headaches. This effect becomes more pronounced with age.
The first thing you said about PWM? That's a thing people say when they're not doing so well with cause and effect and cognitive bias. This new thing you're inventing about the IR is a much worse version of that.
It doesn't have a damn thing to do with the manufacture or components of your phone. Stop trying to read a phone screen (or look at anything on a phone close up) in a dark room. That's it. Don't do that. It's a thing that makes your eyes and head sore. It's really well documented. No new explanation is needed.