I know that the Doctor didn't want the Time Lords to come back because it would start the Time War all over. I also know that Tasha Lem didn't want the time lords to come back because she wanted peace. Why didn't the Doctor just leave in the TARDIS and everybody could go home?
tl;dr: The hostile species would have destroyed the entire planet the minute The Doctor wasn't there to stop them. The only thing holding them off was the knowledge that The Doctor was on the planet, and could answer "the question" before they could stop him.
The assorted hostile races were not specifically trying to kill The Doctor -- like The Silence, The Doctor's death was merely a means to their ultimate end. They were trying to obliterate Trenzalore completely. They knew that, as long as the planet was still around, there would be a possibility that The Doctor would come answer the question and bring back Gallifrey.
When the aliens first arrived, no one knew what was going on or what the signal actually meant. They were afraid of it, though, and would have invaded Trenzalore to try and decipher the message on their own. Only the arrival of the Papal Mainframe before anyone else, and their attempts to shield the planet, kept the remaining species at bay.
Once The Doctor made it onto the planet and translated the message, it became clear to everyone orbiting the planet who the message was from and what it signified. None of those hostile species, especially the Daleks, wanted to see the Time Lords return. The Daleks would have immediately started trying to kill them, and the other races knew that the Time War would just start all over again.
Their resolution was to destroy the planet, in the hopes that it would destroy the only place where Gallifrey could return from. As long as The Doctor was there, however, they couldn't risk doing anything. They were afraid that, if any of them tried to take any drastic action, The Doctor would answer the question at the last moment and the Time Lords would return. The Doctor, for his part, couldn't answer the question, because he knew it would kick-start the Time War, but he couldn't leave, because it would be leaving Christmas, and all of Trenzalore, to its destruction.
Thus, we get the stalemate, with everyone trying to destroy Christmas and kill The Doctor before he could answer the question.
The Doctor couldn't leave because the signal being translated already meant that all the alien races knew The Doctor had arrived there. Second, Tasha Lem knew that the Doctor was already there meaning the Daleks knew too. Third, the rift in the wall was still open. The Aliens didn't have any exact idea on how Gallifrey intended to return and hence were on the "destroy it all" kinda strategy. The rift + Doctor made the aliens think that he would obviously attempt bringing Gallifrey back. So all the aliens kept attacking just to make sure that Gallifrey did not return.