Varys' endgame is too do right by the realm and it's people. He doesn't care who sits on the Iron Throne as long as his ideals on the subject are fulfilled. We first learn this when he visits Ned Stark in the dungeon.
> Ned Stark: Tell me something, Varys. Who do you truly serve?
<br>Lord Varys: **The Realm**, My Lord. Someone must.
<br><sub>Game of Thrones, Season 1 Episode 8, "The Pointy End"</sub>
He also reiterates this when he next visits Ned.
> Eddard Stark: What do you want? Tell me. No riddles, no stories. Tell me, what do you want?