I'm not sure the details, did they really end up burying them? My aunt bought a small house in Hingham a few years back, around the time they were doing rail construction or expansion. She did her due diligence, knew it was coming, and was OK with buying the house knowing there would be tracks across the street (or maybe they were getting more busy, or something). She wasn't there long - her company OK'ed her buying the house then shut down her division a few months later, genuinely scummy on their part.
Overall my point is, you're buying a house. Yuge investment. Check out the crime data, the school systems, taxes, infrastructure, local government, etc. Have the home inspected. Visit at a few different times of day to check out the traffic patterns, etc. What kind of moron doesn't do due diligence when make a hundreds of thousand dollar long term investment? It's not like the Rod & Gun sprung up overnight, it's existed for 60+ years. Nobody moved in and then was told "Oh, we just approved opening a Rod & Gun with a loud shooting range".
I've got a Rod & Gun that is practically in my back yard... to me, that's a benefit, but if my neighbor bought a house and then got mad about the noise, I'd laugh my ass off.