Actually maintained rail shouldn't have this problem, but the private companies like Norfolk Southern spend the minimum amount to keep them operational.
With a budget just a fraction of highway upkeep and expansion they should be able to be kept in good repair.