This did pretty much happen with railways during the industrial revolution. Huge amount of money was invested into railway build-outs and most investors lost their money even though the result was useful in the long run (though only a subset of what was built).