Education is not underfunded, we spend broadly in line with all comparable countries and more than Switzerland and Germany.
There's a difference between underfunding compared to other countries, and underfunding compared to what it needs to run effectively.
For example, if other countries do not have the same expectation that all of societal ills will be sorted by schools, and instead properly fund external SEN, health and mental health services, then their schools will function adequately on less money. If they have properly funded pre-school intervention and support services (like the old Surestart) then they will need less funding for primary schools to pick up the pieces of children coming to school unsocialised, in nappies, with speech and language problems. If they have a society where child poverty isn't through the roof (unlike ours) then they won't need as much money for funding food, clothing and school supplies for children, or resources to narrow the disadvantage gap.
If schools are expected to do more, then they will need more money than schools which are expected to do less.