Bottom line: There isn't convenient, modern, fast, open-source method for cross-platform development.
Swift bridges nicely with C and it is built on LLVM so you will be able to use it on Android with Android NDK and bridge it through JNI and Microsoft recently also adopted LLVM so you will be also able to use it there.
React Native
I've used Appcelerator Titanium fairly extensively. The performance difference vs. native code is undiscernible. Unfortunately, JavaScript is an awful language to use, so there are tradeoffs. Maybe Titanium + TypeScript would be the sweet spot.
There is ActionScript 3
even if you think that "flash is dead" in the browser, for mobile and Desktop you can use Adobe AIR
for server-side, command-line and shell scripts you use Redtamarin https://github.com/Corsaair/redtamarin
I'm the dev behind redtamarin but I welcome other projects like perfect.
Even if the tech and language are different, different pros and cons, a lot of ideas and features are shared.
I switch fluidly between rails and swift, and I leave the java dev to those who enjoy it.
There are already several solutions for sharing library code for business logic between the platforms, either using C++, or compiling Java to Objective-C, and that's about as good as you're gonna get.