Of course not. Mindless in the Avengers is a positive. We got all the character developement we needed from the solo flicks and the Avengers was the Destroy All Monsters of the series. Just action, one liners and colourful imagery. It was brilliant, shallow but it didn't need depth while the Transformers fails at everything + its racist.
If you want to call Transformers racist you can, but let's not pretend that the Avengers doesn't tap into the matrix of oppression.
Tony Stark -- The leader, white male in 50s and good at everything;
Bruce Banner -- White male, 40s or 50s
Thor -- White male, might be 1000 years old, looks like he is 28.
Steve Rogers -- white male, looks like he is 30, really he's ~92 years old.
Hawkguy -- white male, looks like he is in his 30s
Natasha Romanov -- white *female*, probably early 30s
This is a cast of white heroes that the audience can get behind, the Avengers cast in costumes could be argued to look like a ku klux klan halloween party. Transformers at least had some black cast members who contributed, certainly more than Nick Fury who is there to contribute as a motivational speaker. Further, not only is the cast white, but it's not even a diverse white: it's specifically a northern european white.
Contrast this to Man of Steel, which had black actors for General Swanwick and Perry White, and of their white actors, not all were northern European exraction (e.g. Chris Meloni, Ayelet Zurer, Alessandro Juliani, Antje Traue). If race is an issue you genuinely care about, then Avengers is far behind Man of Steel, Pacific Rim, or Man of Steel.
I leave aside some of the offensive jokes in the Avengers, which mock adopted people, Germans, etc. I also leave aside the military porn at the start, where Shield mocks some incompetent eastern European mobsters in a show of American military (we have F-18s on your ass!!!) meant to stroke the audience's ego about the distribution of power in the world.