There's of course the ur-boarding school novel, Tom Brown's School Days - but not fantasy, no definitely not fantasy...The Worst Witch (Jill Murphy, 1974). Adapted to TV a couple of times.
And you could consider the non-fantasy boarding school genre that inspired them. Harry Potter is a rip-off of Mallory Towers (Enid Blyton).
Of curse, the interesting thing about Worst Witch is it's old enough to have made the original Appendix N. But with it being British, Gygax wouldn't have come across it. So maybe "what would the archetypes be if D&D had been invented in the UK?" would be a good question.