Churches and malls were converted to residential buildings. Why not office space?
Electric, HVAC would be similar.
However, still could be possible in some buildings and ultimately be worth doing. For other properties it might be cheaper to raze and rebuild rather than try to fit residential space into a commercial-plan building.
Completely agree with other posts that the risk of loss should be squarely on the owners/investors. Property is an investment like anything else, and may lose value. And I'd guess commercial property is riskier than residential.
https://www.google.com/search?channel=fs&client=ubuntu&q=qub...
I have seen some instances of older 1910s to mid 1930s era office towers in NYC retrofitted to (very high end, very expensive) condos.