Spending in general is not a universal or meaningful metric to measure quality of education, details matter. Huge sums spent on school security/meals/transportation do nothing to increase quality of schooling compared to countries where all those measures are unnecessary (safe urban environments with parents able to feed kids by themselves)