At first, I thought it was because of the new UI design was too bright (not clear) and the font did not look clear so I tried to calibrate the display to make it darker and increase contrast in Accessibility. Everything was better. It was clearer and easier to see. However, the problem still existed. I even copied the Display profile (*.icc files) from OS X Lion and used it on those new OSXs but no luck.
I gave up and sticked to OS X Mavericks for a while. Note that OS X Mavericks and priors are fine. In the beginning of September 2017, I started to learn Swift 4. As Swift 4 is compatible only with OS X 10.10 and laters, I tried to make research on this problem again. I went through several forums and someone said she had the same problem but her eyes seemed to be better when she changed the Display profile to "sRGB IEC61966-2.1". She said she couldn't see the difference when switching to that profile, but she felt better with switching to that profile. I tried it too but it didn't work.
After that, I tried the Apple RGB profile, which I copied from Windows 8 I installed on my MacBook Pro 13'', and my eye condition seemed to be 90% better. No pain in the eyes anymore. I could star at the screen for hours. Note that the other display profiles from Windows 8 didn't solve my problem. However, I still felt a little bit fatigue and got a little bit headache though.
To improve the fatigue eye condition, I then changed the Color Temperature in Night Shift setting to warmer may be at 40%. The headache issue resulted from small system font size. I increased it by decreasing the screen resolution from 1366x768 to 1280x720.
Overall, switching the Display profile, increasing the Color Temperature, and increasing system font size did improve my eye condition about 90% after I've tested it for a few hours. After using it for a few days, I feel my condition has 99% improved. I think my eyes is getting used to it.