'These numbers include all children of middle school age, not just those who attend school.'
I think the low scores are telling you more about the pressure on children in poorer countries to work to support their families, rather than the quality of teaching when they are able to attend school.