Plans for £38bn investment in railways unveiled