Pretty sure a minion’s tracker of spells cast on it is updated much earlier than that. I’m also reasonably sure that a spell fully resolves before deaths are processed. If a minion like this needed to survive the spell for it to count, you couldn’t play Topsy Turvy on a Test Subject and get it returned to you, which was a key part of a combo deck around when Boomsday came out. I think this also has to be done in the Puzzle Lab.
Zerek may be implemented as an “after you cast a spell on this, become able to resurrect” trigger, but that would make him inconsistent with other minions that are capable of tracking spells cast on them immediately.