How many OS releases from 30 years ago still have commercial support? How many OS releases from today can still run a binary from 30 years ago? Will the 30 y/o toolchain still work? Will the most recent release of the toolchain be able to compile 30 y/o code? Do you still have all of that 30 y/o code? Are there other dependencies? Can it run on modern hardware or is it readily emulated / virtualized? Is talent with the necessary experience still available in the workforce?
Looking back is pretty bleak and I don't think it's any better looking ahead. Technology is a liability.
The off-the-shelf answer today is a variant of QNX or VxWorks. No one gets fired for picking those.
For more critical applications, Boeing is using Ada on Linux atop AMD's new embedded CPUs, which have no closed firmware (to ensure auditability).
Sadly, Boeings culture rot has led to some poor design decisions recently.
Usually Linux always runs in a VM sandbox on top of such OSes, like Green Hills INTEGRITY OS.
https://www.ghs.com/products/safety_critical/integrity-do-17...
They probably run Linux in the less-critical stuff on the plane. At one point, they were running some apps on Windows and Linux simultaneously as a reliability technique. I don't know if they still do that.
I'd probably use GNU/Linux, but build it in a fashion that make it easy to swap components (either hardware or software) as needed.
Or don't let your software get 30 years old. Reduce the number of components required to run it (avoid complex toolchains) so that when upgrade/porting time comes, there are fewer things to break.