No, non-Islamic education is not illegal.
But even in non-religious schools, there is usually some kind of Muslim education. An imam brought in to teach some subjects, for instance.
Let’s see...my boyfriend was taught: Jews are evil & Allah’s wrath is upon us, a Wahhabi imam from Saudi encouraged the kids (5th grade) to grow up & do jihad in Chechnya, the Jews stole Israel, Allah cursed the Jews...the only positive thing ever said about Jews was that Jews are very smart & Arabs are stupid, & the kids were encouraged to do well in school so they can be smart like Jews.
& these were not religious schools at all.
What country did your boyfriend go to school in?