In Age of Ultron #10, Brian Michael Bendis constructs a situation that justifies Hank Pym’s ego-driven mistakes and turns them into something heroic that happen for the greater good. He doesn’t have the option of not inventing Ultron. In a sense, Pym is put in a position where he knows that he has to invent a genocidal robot and be forever defined as the man who did that. He must make a tremendous sacrifice and never know that he’s doing it. It’s rather selfless in a way. It’s probably the most heroic thing that Pym has ever done.
The point of the action is not that he would do it anyway – or that he doesn’t find a way to avoid doing it and still prevent the world from descending into something worse. The point is that he tries to do what’s right as best he can. Pym is a flawed person, one that is often driven by ego, but he’s also someone who genuinely tries to be better. And allowing himself to be blamed for Ultron to maintain history is doing better, especially for someone as egotistical. Ultron is his greatest failure and he allows it to happen.
You might be able to argue that Ultron isn’t really Pym’s fault, because it is a sentient being capable of making its own choices. That it rebelled and turned evil almost immediately suggests that the failure is his rather than one of accumulated experience and a freedom to choose like exists in humans. However, that he’s presented with a choice and still goes forward, means that it is his fault. But, that also means that the Marvel Universe as we know it is his fault along with Wolverine and Sue Richards. Those three had the choice to undo everything in an effort to save the world and, instead, figured out a way to not destroy the world to save it. It’s a more nuanced and difficult decision than simply killing Pym. It’s not the best option, but it is a better option.
Pym is a character that always looks for the better option. He would have created Ultron no matter what, because he wants a better world no matter the cost. At the end of Age of Ultron #10, when he realises his mistakes and how to proceed with artificial lifeforms, it’s not simply an act of ego, it’s a decision to try to be better. How can he improve both himself and the world around him if he doesn’t allow his ego to push him a little? If he allowed the failure of Ultron to stop him, he would be a coward and a true failure.
Pym’s resilience is truly unique. You may think that Spider-Man and Batman can bounce back and they can. They’re not in the same league as Hank Pym. Pym is a man whose traumas are mostly self-inflicted. His failures are public and he’s done everything possible to make everyone who’s ever cared about him want him to disappear forever. Yet, he continually comes back with a new Avengers team, a new invention, a new plan to be the hero he desperately wants to be, despite not being an innately heroic person. While other heroes struggle to do the right thing despite external situations, Pym is one of the rare heroes who struggles to do the right thing despite his instinct to do something else. He’s a bad person constantly struggling to be better, to be good.
Age of Ultron #10 doesn’t provide Hank Pym’s redemption, because Pym will never find it. It would be the end of his journey. The final Hank Pym story is when he finally becomes the heroic man he wants to be, when he finally proves his worth, and, somehow, moves beyond his past mistakes. It will never happen. He will never be the hero. That he will never stop trying is heroic.