A rail link between Devon and Cornwall and the rest of the country is now better protected from rising sea levels and extreme weather.