This is more or less what they ended up doing in the UK after rail privatisation, taking the infrastructure back into public hands.
But you can't have anything like fair competition on train services. It's not like anyone can just plonk a train on the tracks and outcompete the other trains. They're awarded franchises, which typically have a monopoly over a particular type of service on those tracks. They can't be outcompeted, the only way they lose their franchise is if the govt is forced to step in to pick up the pieces (which has happened several times in the UK).