Why can’t these funds including the social security funds diversify into real assets ahead of a default?
The rate of return on those assets will decline in proportion to the new money chasing them. On the margin, (and more so over time) new productive opportunities will occur as the cost of capital to business declines, but in the short run all you are doing is inflating a bubble.
SS and other entitlement/retirement programs hold a monstrous amount of the total federal debt. I doubt the federal gov't could divest even a small fraction of those securities without destroying market for them.