And yet investment is continuing. What are they counting on?

Bubbles aren't always rational.

One possibility is that they're counting on another bailout package like the banks and others got in 2008.

The bets are absolutely huge and have been spread throughout the financial system via securitization. If the number does not continue to go up, a lot of people are going to find themselves backing their numbers with money that simply isn't there anymore. Therefore, the number will continue to go up and we (meaning American taxpayers) will back whatever it takes for that to happen.

Now, were the bets stupid to begin with? Of course. Who wants a machine that potentially unemploys major percentages of the population? No one. But the bets were made regardless, and then more bets were made on the hypothetical returns of the first round of bets, and so on and so on.