Humanity will have to defeat the unimaginably vast and powerful forces of the Orks, Tyranids, Necrons & Chaos, defeat the Eldar & Dark Eldar, crush the Tau and then seal off the Warp for good. And without the Warp, their interstellar travel system— and therefore the Imperium— falls apart. They're barely holding their ground as it is. Oh, and they're fascists & religious zealots.
Orks care only about violence, but on the other hand like a good piss up too. They're one of the closest options to a "good" ending.
However, if the Dark Eldar win without dying out, the setting would be similar to how it is now. The differences are the Dark Eldar wouldn't be confined to Commorragh, the Necrons and Chaos would be no more and the Imperium would be weaker; the Dark Eldar still need and want to prey on everyone else.
In that case, a possible Eldar victory would be the Eldar somehow breaking Slaanesh's hold on their souls, destroying the Necrons, humbling the Imperium and reclaiming rulership of the galaxy.
The 'Nids scarf down everything in sight and just make billions more of themselves before moving on to another galaxy.
Chaos merges the Immaterium with the real and rape/torment/destroy the entirety of existence for all of time.
The Tau become a beacon of progress, but employ methods like genocide & mass sterilisation to control the unruly, non-Tau masses.
The Necrons seal off the warp by preventing any emotions from existing (read: killing every living thing), and turn the universe into a smorgasbord of souls for their masters, the C'tan.
That being said, whenever Games Workshop starts a campaign (series of tabletop battles, reported in the White Dwarf magazine), you know right from the start the Imperium (Imperial Guard, Space Marines, Demon Hunters, Witch Hunters and so on) will ALWAYS win the overall plot, even if they get absolutely thrashed in every single battle (Space Marine players being roughly 60% of all WH40K players, they couldn't make them lose without affecting cash flow, can they?).
To make things even worse: Tzeentch, Chaos god of change, mutation, and hope, exists only to plot incredibly complex plans that all go against each other, one failing means another succeds. So, he's basically already won, and passes the time trolling other factions.
Quite the opposite, he will never win, because he is always making plans over the previous plans, so no plan ever gets to work and give him the final victory. Why? Because if he ever truly wins (IE. destroying completely the Imperium and establishing hell in the Immaterium), in that moment he will die. In a sense, he is keeping that incredibly insane net of plans over plans as a risky and entertaining game, manipulating everything, even his chosen ones (some of the worst victims of Tzeentch are known to be his greater daemons, the lords of change and Magnus the red, the daemon primarch), so chaos is always there, never winning and never truly losing.
Khorne, the god of war, is in the same situation: he is powered by blood spilled in battle, be it those of his followers or their enemies, and his throne sits on an ever-growing pile of skulls, again, from Worthy Opponents or his defeated champions. The only way to truly defeat Khorne would be to stop everyone from fighting forever- see Necrons above.
Although the scary thing is, that arguably, the Orks have already won. The Universe of Warhammer 40,000 is subsumed by constant war. To every race other than the Orks, it's a bitter fight for survival whilst trying to even edge towards their own endgames. For the Orks, it's paradise. So even if the 40k fluff is never resolved, arguably, this trope is still in effect.
Deadlands features an Evil Plan by a quartet of malevolent beings known as the Reckoners, who gain power—and sustenance—from negative emotions, especially fear. Their ultimate goal is to bring about The End of the World as We Know It, thereby transforming most of the world into one huge Deadland (that is, a place that is saturated with fear to the point of becoming warped into something straight out of a nightmare), and becoming able to manifest physically on Earth to finish what they'd tricked humanity into starting. The Deadlands sister campaign setting, Hell On Earth, is set in a future where the Reckoners have succeeded. However, the sidebar notes in the HoE rulebook make it clear that it's merely a possible future; ergo, PCs in the original Deadlands game aren't necessarily Doomed by Canon.
This happens in the classic Dungeons & Dragons Against The Giants module series, which first introduced the world to the dark elves, AKA the drow. Originally hired to stop a series of organized giant raids, the PCs are also tasked with discovering who is actually behind the attacks. In their investigations, the PCs can find that a group of drow led by a priestess named Eclavdra organized the raids. The second set of modules traces the PCs' following the drow back to their underground city, and possibly leading them to attack the temple of Lolth, the demoness who is apparently behind the raids. However, what most people don't realize is that Lolth is not responsible for the raids. The giant raids were actually organized by a rogue drow house who were seeking to use the giants to create a puppet kingdom on the surface world, and then use the power they gained from it to challenge the priesthood of Lolth for rulership of the entire drow vault. It's implied that the means for the PCs to follow the drow back to their homeland was in fact done by Eclavdra, head of the rogue drow house, to fool them into thinking that the priestesses of Lolth were responsible for the attacks and hopefully lead them to retaliate. The beauty of this backup plan is that Eclavdra really has nothing to lose either way — even if the PCs decide not to follow her back to the drow vault, or are slaughtered in their attack, then she's lost nothing. But if they succeed in banishing Lolth and destroying her temple, they've set up the perfect conditions for her rogue house to seize power over the entire vault, thus accomplishing what she'd initially hoped to do in setting up the giant raids to begin with...
The GURPS Reign Of Steel supplement features a setting where AIsTurned Against Their Masters and won decisively, leaving the last remnants of humanity as rats within their walls to be exterminated at their leisure. Most of the remaining conflict is between the AIs themselves, each of which has claimed its own territory and has different ideas of what to do with it.
In Magic: The Gathering, we have the Shards of Alara and Zendikar blocks. Everything goes almost as Nicol Bolas plans: in Alara, he absorbs the maelstrom and is restored to his previous godlike state. In Zendikar, he succeeds in releasing the Eldrazi without any of the protagonists even realizing that he did it.
The final set of Scars of Mirrodin is called "New Phyrexia". From the title alone, this is really bad news for everyone living on Mirrodin and a lot of other people elsewhere.
This is par for the course if the players end up getting killed or otherwise failing in their mission...unless they're playing evil characters themselves, in which case this trope may result from the players succeeding.
Betrayal at House on the Hill: After the haunt begins one player becomes the Traitor and it is very common for that player to win depending on the setup of the game til that point. Each haunt has winner flavor text in the good guys' "Secrets of Survival" or the bad guy's "Traitor's Tome".
The Lord of the Rings: War of the Ring has an after-battle report in White Dwarf, wherein the staffers reenacted the Battle of Minas Tirith. Things went decidedly different from the book and movie — Éowyn and Merry died fighting the Witch King, who in turn fell to Théoden, while Aragorn, Gimli, and Legolas fell afoul of the most fortunate Orc archers in the history of Middle-Earth. At the battle's end, trolls had broken into the city gates, the forces of Good were in shambles, only two out of a starting twelve Good Heroes were still alive, and although Théoden had managed to destroy several more Nazgul, he couldn't win the fight alone and was forced to retreat. To quote the magazine itself:
"Sauron may have lost the Witch-King, but the Pelennor is his. More than nine Good Heroes have fallen, and with them, all hope..."
The 4chan project Disney Villains Victorious creates a world where Chernabog kills God, and each of the Disney Villains succeed in their goals. They rule the world as we know it, but hope remains.