Are you worried about the damage from visible light that you see every day? Even though visible light has a much lower wavelength than infrared light, meaning it has far more energy, and is more likely to do damage than IR light, I’d assume you don’t have a large fear of that. The IR light isn’t at a very high intensity, and the bursts are so short that the total power output is minuscule, such that there just isn’t enough energy to damage your eyes in a meaningful way. Plus, infrared light is emitted off of every single object on earth as heat energy, and I also doubt you’re worried about looking at a hot cup of coffee compared to a cold one. There are almost no possible long term effects from this infrared light, mainly due to the tiny amount of power it emits and the fact that our eyes are always being hit by infrared (and higher energy visible light) constantly every day. With that said, it may be possible that it’s causing eye irritation or headaches, but it’s far more likely that this is due to the PWM.
OP: Have you tried using the phone on max brightness all the time for a few days, and then a few days on a much lower brightness setting at all times (with auto brightness off)? If you see a change in the eye soreness it’s likely the PWM. You mentioned that the eye strain is a bit worse at night, which I’m guessing is due to the screen being at a lower brightness, which makes the PWM more pronounced and more likely to cause problems.