I think that those functions are potentially better served by a truly global organisation, one without an overtly political agenda of its own. The problem (or one of them) with the EU is that its own political and geopolitical aspirations render it potentially another belligerent, albeit one without the teeth required to counter Russia, China or even the US, let alone the unity.
I would suggest that what you aspire to is a global organisation devoted to peace, justice, and the rule of law, equality of opportunity regardless of race, religion or gender, so a levelling up of health, education and the production and supply of food, transport infrastructure and governance, of technical and safety standards, of issues around global warming and sustainability, and of human rights.
We could call it, let's think...how about the United Nations?
Ugly sarcasm aside, I know the UN has its shortcomings, but its membership is 193 nations, it has what is effectively the highest court of justice on the globe, a rather better record than the US on peacekeeping since 1945, it encompasses numerous subdivisions such as the WHO, WFO, UNHCR etc..
And although its founding charter talks of 'world governance', its agenda is not to accrue power for its own sake, or for the personal benefit of its officials, but to improve the lot of humanity as a whole.