The UK must invest in rail and road networks or accept more extreme weather disruption, a government advisor says.