The European Union has pledged to invest 11.5 billion euros ($13.3 billion) in South Africa in clean energy, infrastructure and pharmaceutical projects, it said late on Thursday.