The Gulf countries at the very least employ millions of migrant workers who are generally not entitled to the same level of health and education services and, I would imagine, not counted in these statistics.
Plus if you look at the chart for patents per million tertiary students, UAE, Qatar, Saudi Arabia, are also all in the bottom third so it's not like they're that far ahead.