Even older research supports the claim that black on white is easier on the eyes, this is why we switched away from white on black (DOS and UNIX). This applies to screens in well lit environments though, which would explain the rise of the dark mode in recent years: Smartphones in bed. But there it's more about the "less bad" solution.
The key part is having a well lit environment, so that the white background of the screen roughly matches the overall brightness of the surroundings. This way the pupils don't have to adjust all the time when looking around your room and then back at your screen, or when looking at code where the screen is mostly black with some text, and then some article with images.