Keeping skills and class features does make sense. It accurately models how amnesia frequently works. This is also much better for the game.
By the way, “amnesia” can be “retrograde” (lost memories before the incident) or “anterograde” (unable to form new memories after the incident). In most media, “amnesia” refers specifically to retrograde.
The human brain actually stores personal memories (events that have happened to you) very separately from procedural memories (how to do things). It is entirely possible to damage one without touching the other.
In a particularly famous case, Henry Molaison, known for years in journals only as H.M., lost the ability to form new personal memories during brain surgery attempting to eliminate his severe seizures (the surgery actually worked, too, it just had a horrible side-effect). His memory simply stopped getting updated (he also lost his memories of a year or two leading up to the surgery). He remembered his childhood, his parents and siblings, but could never remember that his parents had died, what his siblings grew up to do, and so on. These things could be told to him, but the moment he stopped actively thinking about them they would disappear, with no way to recall them again. Every time he learned his parents had died, it was the first time from his perspective.
But he could learn new skills. He could navigate, and even draw a map of, the house he lived in, though he had no memory of having ever lived there as he moved there five years after his surgery. He learned to touch-type, though he had no memory of having ever seen a keyboard before. He picked up new artistic skills, learning to draw a figure from a reflection in a mirror.
Some of you may think this sounds familiar: the case directly inspired the movie Memento.
Now, anterograde amnesia (inability to form new memories) is different from retrograde amnesia (forgetting memories from before the injury, but able to create new ones), a fact that H.M.’s case actually helped to prove. That said, while there is no case as famous as H.M. for retrograde amnesia, the same facts hold true: personal memories are separate from procedural ones.
So a person could easily have all memories of ever having learned to cast a spell erased from their memory, yet still retain the ability to cast spells. If you hand him a spellbook, he may say he’s never seen one before – but he would be able to read it, prepare the spells, and cast them. For that matter, he would be able to prepare and cast read magic – the most fundamental and ingrained of wizard spells – without a spellbook.
In this case, it’s just a matter of the wizard getting a new spellbook, or recovering his old one. With no memory of where he lost it, or of any old allies or friends who might be able to help him with that, this will be more difficult than it might otherwise be, but ultimately with his ability to read and write a spellbook intact, he can do so about the same as any other wizard. As a DM, I would probably throw an opportunity or two for getting a “used” spellbook, already with a lot of level-appropriate spells on it. That will give him a good start to reforming his repertoire and allow him to participate as a character of his level ought to. The circumstances of this depend a lot on the specifics of your game: there might be a pawn shop selling it cheap, not realizing its value, or taken from a defeated enemy wizard, or found in a catacomb or ruin somewhere. Or, if you don’t mind a huge timeskip, find a way for him to earn access to a magical library and let him spend a few months recreating a basic spellbook.
Obviously, for such a character, he will also want to learn about his past. This will most likely be an extended quest/plot arc, but somewhere along the way he may come across his old spellbook. Could be interesting to see if he goes back to it, or continues to use his new one.
All that said, it’s also possible to lose procedural memory (with or without losing personal memories), or to be unable to form new procedural memories (again, with or without affecting personal memories). So you could lose your class features.
I don’t recommend you do that. If you must, the best way to model it is that this resets the person’s XP to zero (retrograde), or prevents the acquisition of further XP, locking it where it is (anterograde). Obviously, this completely changes a game, and if it only happens to one person he probably cannot continue to quest with the same party. But someone with retrograde procedural amnesia is, in some effect, a blank slate. It does not make much sense that he would remember how to do some things (better ways of attacking, heightened reflexes, greater mental discipline, training in skills, and so on) but not others (how to cast a spell), so leaving class levels but taking away class features (à la a fallen paladin) does not make very much sense.1
I don’t think this makes for a very good game. The powerful wizard, still able to cast powerful spells, but with no memory of ever having learned the spells and no personal knowledge of how they are used, is an interesting case, fun to play. Restarting from 1st... well, that can be interesting too, but it’s basically the start of a new game, with a reference to the previous one.
1 Actually, it’s probably possible, but it would have to be extremely specific brain damage. I don’t recommend turning players into high-level commoners in any event, though.