As complicated as the stories on Game of Thrones may be, there are few characters as mysterious as Lord Varys, aka the Spider. From the moment he appears onscreen, he's never reveals his cards and keeps his motives close to his chest. It makes sense — the man didn't become the "Master of Whispers" for no reason. But in season seven, we get a better understanding of Varys's purpose when he reveals to his current Queen, Daenerys Targaryen why he has no problem working under different crowns.
He explains that as a man who grew up poor and was sold as a slave, he understands what it's like to live in the alleys and gutters. His loyalty is to the people, not to any one monarchy, and he will continue to do what he thinks is best for the realm. If that means helping usurp an incompetent leader for a better one, he will do it. "If you demand blind allegiance, I respect your wishes," he says. "Grey Worm can behead me or your dragons can devour me, but if you let me live, I will serve you well. I will dedicate myself to seeing you on the Iron Throne because I choose you. Because I know the people have no better chance than you."
It's a beautiful speech and it sheds light on why Varys has always seemed to have his hands in every pie — though he's obviously never afraid to pull back when things go sour. However, a conversation with Melisandre hints that the Spider won't have much time to put his fingers in any new pies — or even see this venture through to the end.
In the third episode of season seven, Varys confronts Melisandre about her hand in Jon Snow being invited to visit Dragonstone. Before leaving for Volantis, she tells him: "I will return, dear Spider, one last time. I have to die in this strange country, just like you."
Considering Varys's hatred for all things magic, it's no surprise that he looks absolutely shaken by Melisandre's words. It brings him back to the night he was cut as a child after being sold by his master to a sorcerer. That night, the sorcerer gives him a potion that leaves him unable to move or scream, even though he can still feel pain, and then the sorcerer castrates Varys and uses his parts to perform some sort of dark magic. Before the sorcerer leaves young Varys to die, he hears a voice in the flames, and the experience changes him even more than becoming a eunuch does. He even confesses to Tyrion that this voice has haunted him his entire life, but he doesn't divulge what he heard.
Since Melisandre is a follower of R'hllor, whose worshipers believe he relays messages through fire, there's no doubt that her message to Varys is a hint on what he heard in those flames. It's very likely that Varys heard the voice of the Lord of Light himself, telling him what his ultimate fate would be. It would explain why Varys is so gung-ho about finding the right ruler for the Seven Kingdoms; maybe he wants to make sure the right person is seated on the throne before he dies. Varys could have also received a task from the flames, telling him to find the right leader or he would die. We've seen people receive messages or visions from the flames before, most noticeably the Hound. So, it's possible Varys has always known his time was coming and Melisandre's omen means that it's coming sooner than he expected.
Since this is the final season of Game of Thrones, there's really only two ways that this could go: Varys can either die before he sees what happens to the Iron Throne, or his fatal prophecy is averted and he lives a long healthy life! Considering this is Game of Thrones, we're not betting on the latter.