Its one of the many things i like about the MCU , the characters have development. Shit happened and those things have an aftereffect on people.ie. tony and almost dying.
I get the idea behind it (don't think I don't) but it's just that I think it's a dumb idea. Iron Man's selling point was his ego, narcissism and overall fun chaotic personality. While there is still a slight undertone of that left it's nowhere near as good as it was which makes his character lose a lot of appeal.
I mean, Iron Man 3 tried to actually hide this in its trailers by putting jokes in there, giving the impression that the humour is still there while in reality there were barely any jokes in that movie and those that were in sucked. (Tho I blame the directorial change for this whole shift)
I just don't think the new tone fits the character as he was established and to me he lost all appeal he had. I mean, I'd be somewhat over it had it been executed in a more graceful manner but the way they did it felt totally forced and out of tone. For example, Iron Man 3 (and later movies) were riddled with Tony's traumas caused by the wormhole but in the Avengers there wasn't even a hint of that! The first thing he said after surviving was a joke! Way to fool people into thinking good old Tony is still here. This further supports my theory that the change of tone wasn't an intended shift in tone but merely a side effect of the plague that is Shane Black.
Following movies simply took this and tried to integrate it into continuity to make it more natural while only making things worse for the character as he has now been reduced to a plot device! His weak mental state is only there to drive the following movies on (as if they couldn't find another way).
I mean, had the character stayed the same we wouldn't have Ultron or Civil War (atleast in these circunstances). It's just a thing that bugs me about recebt MCU movies - they're going to pull off a great movie but sacrifice the initial characters' charm to do it which (to me) ultimatively takes away from the overall pleasurable viewing experience.