One thing I know for sure is that colors are easier to differentiate with light on dark. I switch from my normal light color scheme to a dark one in bright environments because there's more contrast for the syntax highlighting colors. However, my personal expiernece is that white on dark is stressful for the eyes. It's
ok on my computer but really bad on my phone (very hidpi), and even worse with the blue light filter on. Even if current research indicates light on dark is better, that doesn't mean there aren't a nontrivial number of people who have issues with it.
W.R.T. your other point, my argument was that people should be able to use their own themes but then it becomes the responsibility of the User Agent vendor to provide a great default one. While Mac doesn't allow custom themes, they have made this work pretty well with a switchable light/dark theme. All apps using the native widgets look beautiful; each app designer just has to put UI elements in the right place and make them behave nicely with user expectations. I don't use macOS personally so I don't know how this works with nonnative apps, but on the browser we have a single language set (HTML/CSS) with tags for everything already (button, progress, various text input, radio/checkbox, etc.) so that's not an issue.
In my previous post I alluded to replacing HTML/CSS but that seems unnecessary. Currently CSS is used for both styling and layout/positioning. If User Agents provide a great default style then users can strip out the CSS styles, the same way users can disallow custom fonts after specifying a good default font in the UA settings. And when UAs become responsible for styling, it's only natural that the more feature-rich UAs would allow users to configure the entire theme.
Determining which parts of CSS are style and which are layout might be a bit difficult, but can't be too hard. Eventually people will start using CSS for layout only and stop putting style in CSS, which solves the problem. The only possible issue is that companies still want to shove their branding down our throats instead of letting us use a native-looking or otherwise preferred theme. In which case... fuck 'em. I'll block it the same way I block their shitty fonts.