The UK and European Union said they have signed the legal texts allowing Britain to rejoin the bloc's Erasmus student exchange scheme, five years after Brexit forced its departure.