Putting resources into training on the planet's most unfortunate nations is the "absolute best speculation we can make in the fate of humankind", Boris Johnson told a worldwide instruction highest point in London.
World leaders pledged more than $4bn (£2.9bn) to support schools through international Partnership for Education.
Nobel Prize winner Malala Yousafzai told the summit girls in particular faced an "education crisis".
But charities warned the UK's aid cuts had harmed fundraising efforts.
The Global Partnership for Education, which distributes funding in more than 90 poorer countries, wanted to raise $5bn (£3.6bn) to create an extra 88 million school places and support the learning of 175 million children during the next five years.
Pledges at the summit, hosted by the UK and Kenya, included:
- £595m from the European Union
- £430m from the UK
- £300m from Norway
- £173m from Canada
- £218m over three years from the United States
Julia Gillard, former Australian prime minister and chair of the education aid organisation, was confident that the full $5bn would be raised, but different national budget cycles would mean it would arrive in stages.
PM pledges £430m for girls' education at G7, Government wins vote to cut overseas aid
She said the pandemic had disrupted education in all countries - but the impact of closing schools had been much worse in poorer countries where many families lacked access at home to internet connections or electricity.
The UK prime minister hailed the fundraising initiative, saying investing in international education projects was a way of tackling "ignorance and prejudice" and boosting the economies of poorer countries.
"I'm immensely proud of the achievements of this summit today and I'm proud of what the UK has been able to contribute in spite of the difficult financial circumstances," Mr Johnson said.
Improving access to good quality education, particularly for girls, was the "panacea, the universal cure," the prime minister said.
"This is the Swiss Army knife, complete with Allen key, a screwdriver and everything else," he told the summit.
But charity Save the Children said the fundraising drive had lost leverage because of the UK's own aid cuts, which had left it with "diminishing leadership on the world stage".
The One anti-poverty campaign warned of a "decidedly underwhelming result", saying the UK's overseas aid cut had "damaged our credibility".
Gabriela Bucher, executive director of Oxfam, questioned the priorities of a world in which billionaires could compete in launching private space rockets while millions of children are unable to go to school.
She also warned of the negative impact from the UK "dramatically cutting aid".
Malala Yousafzai told the summit of the importance of investing in education for girls in countries where they had fewer opportunities "just because of their gender".
"The world is facing a girls' education crisis," the education campaigner said, with more than 130 million out of school around the world and millions more at risk of not returning after the pandemic.
"Their futures are worth fighting for," she told the summit.
Kenya's president, Uhuru Kenyatta, told the conference the fundraising event could "avert an education catastrophe".
'The best equaliser'
"Education is the best equaliser," says Angel Mbuthia, a Kenyan campaigner for access to education, who is supporting the global education summit.
The 26-year-old student leader, currently secretary for gender at the All Africa Students' Union, says education provides a "ripple effect in giving solutions to our most pressing problems".
For instance improving health education is more cost effective than having to treat serious illnesses.
"Once you have a citizenry that is well-educated, they're able to take more preventative measures," she says.
Preventing youth unemployment, creating more hi-tech industries, "political awareness" and promoting gender equality in Kenya will all depend on improving education, she says.
"It's a bedrock, the best foundation," she says,
Angel supports campaigns for girls to have fair access to education, in rural areas as well as cities, and wants that to lead to fair representation in areas such as politics and the legal system.
She argues that events such as the global summit need to give a voice to those who are excluded from a chance of education.
In terms of whether donor countries should fund education elsewhere, she says individual countries cannot only look within their own borders - because international issues will still affect them, whether it's refugees, Covid or climate change.
"That's one realisation we've had from Covid-19," she says. An outbreak in China is now "affecting someone in a very rural part of Kenya".
"We have a responsibility to be global citizens, to talk about these issues," she says.
For more details you can visit Beyond Foreign Education (+917300090999)