According to Page 2 of the the Platform for International Cooperation in Undocumented Immigrants document submitted to the UN and titled "Undocumented Children: Barriers to Accessing Social Rights in Europe" (2012),
"The level of legislative protection afforded to undocumented children accessing education can be broken down into three categories. Some countries, such as Belgium, Italy and the Netherlands, have an explicit reference in their legislation concerning the right of undocumented migrant children to education. Other countries, such as Spain, Poland and the UK have an implicit legal right to education for undocumented children, referring to the right to education for ‘all children’. No country explicitly denies undocumented children their right to education, though there are cases, such as in Hungary and Malta, where the law states the right to education for children residing regularly, so implicitly excludes undocumented children.
"In practice, uncertainty or a lack of understanding of undocumented children’s rights may result in schools asking to see immigration documents to enrol the child. Even non-immigration related documents such as proof of residence, can be difficult to obtain and so their requirement is a significant obstacle to enrolment. When schools do ask for passports or immigration papers, undocumented families can face discrimination. For example, some schools resist accepting undocumented children as it is difficult to fulfil the administrative requirements to receive funding for them [6].
"Undocumented families often fear that enrolling their child in school could lead to their eventual detection, deportation or of the child being taken into care. In certain cases [7] immigration authorities have been sent to detain students or parents at the school gates. News of even isolated incidents of such detention spread quickly through migrant communities, entrenching a fear of detection.
"[7] Richard Moyon of RESF (Réseau éducation sans frontiers) reported how this has happened in France at the Council of Europe Joint Hearing between the Sub-Committee on Migration and the Sub-Committee on Children (of the Social, Health and Family Affairs Committee) on “Children of undocumented migrants: witnesses to problems and action required” 4 October 2011, Strasbourg."
Hopefully this is a helpful indication of how some countries (perhaps Belgium and the Netherlands) may be more likely to uphold the rights of undocumented children to an education than other countries (perhaps France).
However, a child often turns 18 before completing their secondary level education. How do European countries compare in their approach to handling the issue of an 18-year-old undocumented migrant completing their secondary-level education? Does their approach vary substantially, and which countries in Western Europe may be most or least supportive of an 18-year-old undocumented migrant completing their secondary level education there?