Plans to build a new school and more than 2,000 homes around an international train station have been formally approved.