TDK was superior as a film, better characterisation and depth, slower and beautiful cinematography, deeper plot and a truly stand-out villain (and Two-Face wasn't bad either).
Avengers was just tonnes more fun, didn't feel like it dragged, always had something going on that was both amusing and progressing the story. The characters were thin though, stock female action figure with murky past, stock male action figure with murky past, maverick genius with personal demons to overcome, loner genius with personal demons to overcome ... What lifted Avengers on the character front was the relationships and interactions that Whedon specialises in (e.g. The Scooby Gang and the Firefly crew), Banner lifted Stark and Stark brought more light and colour to Banner's character, Coulson made S.H.I.E.L.D. more humane and took the edge off of their technocratic Nazi existence.
Most importantly, the number of set-ups and quips scattered throughout the movie, especially those involving The Hulk, made this movie much more enjoyable. It gave you licence to step-back from the "serious" drama of the action and danger, to laugh and relax.
I think TDKR was a great mixture of the pacing of Avengers with the 'adult' feel of TDK. It had the same sort of pretensions, dealing with 'weighty' concepts, it pushed the fascist police thing (yet again) and it really anchored you in the 'life' and emotionally bleak perspective of Bruce Wayne/Batman. Yet somehow it managed to do this without slowing down for a second. The film was running at 60mph from the opening credits to the closing credits.
Sadly, Nolan's Batman couldn't work with humour, otherwise it would have been even more enjoyable than Avengers, for me.