My sister lived pretty close to freight tracks, and I was never able to sleep there. If you're going to have guests, they'll hate it because they'll never have time to get used to it. On the other hand, I work in a building next to tracks, actually it's next to a a very active diesel repair facility with at least ten tracks. There's also four light rail commuter tracks there. I rarely, if ever, notice the noise any more after working there for fifteen years.
If it's a great deal, take it, but if it's not, why even consider it with all the questions about whether it will retain its value?