I'd almost be tempted to say that TES sometimes riffs on Tolkien on purpose in order to break its cliches. There's the superficial parallel you pointed out here, and there are others too, but the specifics are very different. Beautiful, virtuous elves? Well, TES has alien-looking slavers and elven supremacists. Both have one god who creates a bunch of lesser spirits, which go on to make the world until their plans are corrupted by a trickster. Ilúvatar is supposed to be the purest good; Anu is a suffering, delusional spirit in sensory deprivation. Melkor wanted to rule the world, Lorkhan wanted to... well, it's hard to say, it changes depending on whose story you believe. Devise a means to an end to CHIM/Amaranth, maybe.
When mortal humans need the gods, an Ainur sends Gandalf. An Aedra sends Pelinal. I think that sort of says it all. I mean, Tolkien is great, but he admittedly never wrote about homicidal rage-droids from the future. ("O Manw?, for our shared madness I do this!...")
In fact that might actually be the difference. Tolkien and universes inspired by his Middle-Earth works, like D&D, have black-and-white morality. There is an absolute concept of good and evil. With a few exceptions, in Middle-Earth elves are good. Orcs are bad. In D&D, you're a Paladin if you're good, and a Blackguard if you're bad. You can't be a Paladin doing bad things for good reasons, or a Blackguard doing good things to advance a bad goal; it would change your alignment.
Morgoth doesn't believe that he's enslaving the Noldor for the good of Middle-Earth, he just hates elves and wants to spite the other Ainur. Sauron is not working towards any sort of greater good when he convinces the men of Númenor to worship Morgoth. Conversely, Galadriel turned down the Ring as a direct result of being good. She wasn't so much tempted by the thought of becoming a terrible Queen, as the Ring itself was trying to corrupt her; it's not the act of turning it down which made her good, she already just was.
TES, on the other hand, has a relative concept of morality. I think it often riffs off LOTR and co. specifically in order to point this out. The Dunmer aren't enslaving other races because they hate them; they don't even think of them as people in the same way that they are. When someone isn't a person, the same rights don't apply to them, and in your eyes they don't have to feel injustice or suffering as keenly as you do (if you recognised that they did, no normal, right-minded person would be able to do it). The Thalmor aren't trying to spit in the Godhead's eye; from their point of view, they're trying to save all people from the endless suffering of the Mundus.
It's a more realistic way of going about it, since here in the real world, nobody does things for the sake of being evil. Every destructive, evil organisation that ever was thought that they were working towards a good and righteous goal. It might have been a united nation, or to save people's souls, or personal wealth and power, but they thought that it was a morally good goal. (And continue to think that.)
But this isn't to say that it's necessarily better to portray morality either way, or that either way makes for a more successful story; they're just different. I think it's a nice change for fantasy, however.