Networks are measured for things like dropped calls, so they do have incentives to cover things like railway lines. If they don't, someone else likely will. It's a competitive market and one that EE and Vodafone are clearly winning today. Tomorrow Three will have an edge with stacks of 5G spectrum, but that won't mean much if they don't build the network out sufficiently (and they're spending quite a lot less than the others).
EE also has the emergency services network and with the use of 800MHz (and likely next year or so, 700MHz for 5G) is working towards 95% geographic coverage of the UK. Its target was 2020 but I am not sure it will make that, but it will happen.