Nolan was very obviously doing the beginning, middle, and end of Batman with his trilogy, and the problem is that the beginning was not as strong as other versions of the same story (Batman Year One in the comics, Batman: Mask of the Phantasm in animated form — hell, MotP has pretty much the exact same plot as Batman Begins and is superior in virtually every regard), and the end was too contrived toward being the last Batman story and didn’t follow through very well.
Tellingly, the source material, by its nature, never has an ending. Superhero stories don’t end, as a general rule — certainly mainstream comics superhero stories don’t. (Watchmen, a story that actually did have an end, even made that a major theme of its climax and ending.) So that may be part of why trying to end Batman’s story failed.
But the heart of superhero stories, truly, is the ongoing narrative of their work saving lives and protecting people, so naturally the strongest of Nolan’s three films was the middle one. And it gave us one of the best superhero stories ever, at least in part because the main character wasn’t Batman, wasn’t Gordon, wasn’t Harvey, wasn’t the Joker — the main character was Gotham City. And it was magnificent. (And another reason why the third movie fails is that it pisses all over the Gotham-is-strong theme of the second movie by having everyone just succumb to Bane.)