Imagine that a wizard died in a fire, and their spellbook burned, too. They were in the afterlife for about a month and after that resurrected. They no longer have a spellbook.
Do they remember their prepared spells?
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It only takes a minute to sign up.Sign up to join this community
Generally when preparing spells, you keep almost a full casting of the spell memorized, which is then later triggered by verbal or somatic components.
There are no rules that explicitly state under and circumstances that you would lose access to prepared spells in the event of a player death, and since things stay in a state unless changed by something else, you won't lose those prepared spells.
For example, if you were to not prepare spells for a few days, you don't lose access to the spells you prepared a few days earlier. You can change those spells available via a Long Rest, but the spells don't go away unless there is an effect that explicitly states that it causes a spellcaster to lose access to those prepared spells.
The basis of spell preparation lies in the rules of Vancian magic. Also known as "Fire and Forget" magic. In prior editions of Dungeons and dragons you would trigger your spell, and then lose access to that specific spell slot. However, in 5E, you prepare a list of spells and as you cast you expend energy corresponding to the spell that was cast.
An instance where you would lose access to a prepared spell would be something along the lines of Arcane Trickster's Level 17 ability: Spell Thief
At 17th level, you gain the ability to magically steal the knowledge of how to cast a spell from another spellcaster.
Immediately after a creature casts a spell that targets you or includes you in its area of effect, you can use your reaction to force the creature to make a saving throw with its spellcasting ability modifier. The DC equals your spell save DC. On a failed save, you negate the spell's effect against you, and you steal the knowledge of the spell if it is at least 1st level and of a level you can cast (it doesn't need to be a wizard spell). For the next 8 hours, you know the spell and can cast it using your spell slots. The creature can't cast that spell until the 8 hours have passed.
Once you use this feature, you can't use it again until you finish a long rest.
So in this instance, for 8 hours the caster in question wouldn't have access to that spell. But in the event of a death? Descriptions of death don't indicate that prepared spells are lost, plus, in the event of a character death, a character generally transcends to the astral plane and becomes a petitioner of whatever deity they worshiped when they alive, or whose alignment they shared during life.
So they'd still have access to those spells, albeit in another plane.
There are some important differences between your specific scenario and this one, but Curse of Strahd does contain a bit of plot with some rule guidance on this.
The NPC Patrina Velikovna can be restored to life via an effect that is described as identical to the resurrection spell except that it works regardless of how long the creature has been dead. If the PCs accomplish this, Patrina returns to life with no spells prepared.