Out of idle curiosity I did some back-of-the-envelope comparisons between air travel and low-speed train travel.
I found an unsourced figure of 0.0171 gal per passenger-mile for the Airbus A320, which is pretty typical of the older short-haul narrowbodies that dominate the SAN-SFO route. This comes out to 1.335 megajoules per passenger-km.
Per Wikipedia, Amtrak claims energy consumption of 1.9 megajoules per passenger-km. This is a pretty direct comparison as diesel locomotives and aircraft both use liquid fuel, thus external generation and transmission losses aren’t a factor as they would be for electrified trains.