One of the main reasons for the disparity is the lower taxes that the aviation industry benefits from.
If you fly from Paris to Barcelona the airline not only pays no VAT, but is also exempt from kerosene tax. If you make the same journey by train, the rail company will pay an energy tax and passenger VAT. This means higher costs for the company which are usually reflected in ticket prices.
Archived version: https://archive.ph/7Zrur
Also trains don’t run at night currently in Europe. But France is looking to run trains at night too (mostly by private companies). More volume, lower per ticket price can be justified.
There’s a bunch of trains that run over night in Europe, fewer than there used to be but it’s making a bit of a comeback. SNCF have their Intercités de nuit network, there’s a few in Italy, and the ÖBB run a bunch including some that don’t even touch Austria, and there’s still more beyond that.
Take a look at European Sleeper, no France yet though
Taking a sleeper car on a tour of Europe seems like a wonderful vacation. Spend a day in the city, get on the train overnight, wake up in the heart of a completely different city, rinse and repeat. No flight check ins, no hotels to deal with, no driving anywhere.