Yet we are talking about targeting the server in this thread, because so far the tooling for the browser sucks, and VCs are more willing to sponsor startups selling server products.
Java not only is pretty much alive on the server, so is .NET, Erlang, and plenty of compiled languages that have always been a better alternative to JavaScript.
I am comparing your words about WASM to your words about JS. Misdirections about VCs are irrelevant. You can expect the WASM target to have as great or greater longevity than the JS target, and if your prediction about future failure isn't true of JS then it won't be true of WASM.
Java not only is pretty much alive on the server, so is .NET, Erlang, and plenty of compiled languages that have always been a better alternative to JavaScript.