I think they gambled because they didn't have the cash to buy into MLS previously (probably not now, either). They have all this money, supposedly, to build a stadium and a mall, but we all know New York doesn't care to do that. Ultimately, that's the issue. They'll need to just buy the Red Bulls out or disappear, because the league likely will.
I think they overvalued that Cosmos trademark personally, and assumed it would be worth more than it actually is. I don't think they're broke.
I do think they're fucked when this lawsuit gets struck down. It would effectively be the end of their plan.