Stockholm and Göteborg are not a good example (or the opposite..) since they are too close to each other, ~500km, to cancel the wasted time going to and from the airport and waiting to board the plane.
The fast trains from those city centers are indeed better than flying, although the price compared to low cost flights is too high.
I don't totally agree with your conclusion- I would take trains from Stockholm to central Europe even with kids but only if prices were significantly better than low cost flights, I don't mind a 24 hour ride to Berlin with a stop over or two, but the price is actually higher than most low cost flights e.g. Norwegian