Compared to what America got out of the space race, the bailout was a complete waste. America got something like 100X their ROI in going into space. Major investments in materials science, aerospace engineering, battery technology, computer technology, their probably isn't a product today on the market that isn't using some kind of "space age technology" that ultimately came about because of NASA's space race.
So the space race was clearly worth it. The bank bailout is still clearly debatable. I would argue that because the banks turned around and paid out bonuses, that we should have placed the banks into receivership and re-structured them. In our post-bailout system, the banks have grown even more concentrated and reform is pretty much a failure. We're set up to be "way too big to fail" next time around.
When that happens, we won't be talking about "getting half our money back" and saying it was a "good deal".