As a student I lived next to one for a year and got so used to the noise I stopped actually registering it but that was a fairly quiet local line. Next to a busy inter-city line would be a different thing altogether I imagine
as a kid in the early 60s we lived next to the main london to brighton line and it was great,seeing all the steam trains going up and down,and really after a while you get so used to them you dident even hear them,i dont think it was that good healthwise,but now they are mostly electric so theres no problems with the steam etc,but we loved it.
After a few days you do get used to the noise I lived 30 ft from main London line from the west, everything in the flat shookwhen the trains passed but you do learn to live it.
As the others have all said you do get used to it - like living under a flight path near an airport its the same, your brain soon gets used to blocking out the noise
Depends whether you're a light sleeper or not. I think it would drive me crazy, but having lived under a flight path for many years you do learn to live with background noise
However, when Chicago Charlie (as I call him) flies directly over our rooftop as I'm trying to sleep just before the 11 p.m. witching hour flight ban. and all our bedroom windows are open in this heat I really curse him.
As a child i used to stay at my granmother's, and she lived about a quarter of a mile from the main London West Coast line. I loved hearing the express trains go through, and even now, i would have no objection at all to being near a train line, but that's a personal preference.