Joker would have won in the eyes of the public if Batman didn't take the blame. Not only was Batman trying to keep Harvey's work intact but in many ways, when he looks down at Harvey's body and says "but the Joker cannot win," it's his way of not allowing the Joker's plan of corrupting Dent to work. It's not just about keeping the criminals in jail, it also seems to be about Batman thwarting the Joker's plan.

I think they created a really complex ending with TDK and I was really wondering how they would deal with the ramifications of people finding out about the lie.I think they chose to avoid a lot of it by doing the time jump. Strangely, Gordon still seems to be commissioner by TDKR's end and we get no insight into what happened to him. Was he reprimanded at all? Maybe nothing happened because there is no proof. I wonder if it's the city turning a blind eye. No matter what the goal, Gordon became corrupt as well and it kind of undermines Batman's seeming interest in preserving faith in the justice system. In fact, most of TDKR undermines the ideas of TDK with Blake's story arc.