Yeah, comparing this movie to TDK isn't fair, really, to either movie. FWIW, I consider TDK to be a flat-A movie (not a + because of Bale's ridiculous Batman voice.)
But they're highly graded for different reasons. TDK has themes and tones and deeper meanings and such in it, it's got great performances in it (again mostly excluding Bale) and just a great overall sense of mood and tone. It lacks humor, fun and all of that but it doesn't need it as it's got a great sense of its own moods.
Avengers is great because it also does what it seeks out to do in being a comic book come to life and does it very well. It's own sense of mood and tone stand out well and are done well and, really, I can't find any flaws in it without getting into nitpicking. It's everything TDK isn't and everything TDK is The Avengers isn't. The plot in TA is very
pedestrian and thin, it's downright a commonplace trope. But the characterization in it and the balance of them works out well and it's just a fun movie that doesn't really shortchange any of the characters. It's a good, fun, movie. Not deep or meaningful but just fun.
Now, yes, I give TDK an A and The Avengers an A+ but I'd really say both movies are the best examples of the Comic Book Movie genre. The TDK for tone, mood, and to a certain degree performances (all on Ledger's shoulders) and TA for a more fun tone and mood. Again, the only reason why The Avengers is a partial grade above TDK is because of Bale's absurd Batman voice.