It proved Hubble right about the expansion of the universe, so all in all I think we can say with absolute certainty it was a smashing success.
Apparently the total cost for Hubble is on the order of 10 billion. That's just a fraction of what a tech company like Apple makes every quarter, so I think it was a totally reasonable expense relative to its discoveries.
And luckily we learned building giant, precise mirrors with 1980s technology maybe wasn't the best decision. The James Webb design is totally different and hopefully less prone to such problems.