The Short Answer:
Nothing would happen to any enchantments cast by Odin because they are backed by the Odin-Power, a singular capability possessed by the All-Father. The enchantments would continue to exist and be subject to the control of the new All-Father or All-Mother.
The new leader of the pantheon would be able to alter the conditions or parameters of any existing enchantments. The worthiness condition on Mjolnir would remain unchanged unless the new pantheon leader wanted a different set of conditions for the power to exist.
The Longer Answer:
There are many continuities to contend within the Marvel Universe. Let's assume we will be working with the canon version of the Marvel Universe, Earth #616. We must take several things into consideration:
- The Asgardians are aliens not gods or magical beings.
- The Asgardians do not use magic. It is a significantly advanced tech resembling magic.
- Enchantments do not appear to decay, once put in place they last until removed. (See Crusher Creel, the Absorbing Man)
With those things in mind, let's contend with enchantments in general and on Mjolnir:
- Unless a particular enchantment requires active monitoring, such as scrying, it will last until it is deactivated or the casting Asgardian dies.
- Since Odin does not know where Thor might end up, or under what conditions Thor may have to work, his hammer has no enchantments that require monitoring. All of Mjolnir's enchantments are embedded into Mjolnir and are self-powered.
- The worthiness enchantment does not require monitoring. Worthiness is detected by the hammer's enchantment based on the will of Odin when the enchantment was cast. Odin does not sit around monitoring Mjolnir to determine if Thor is worthy today. (Now if Thor feels less worthy, or has doubts, he may hesitate in his actions but this does not happen often.)
- Should Thor do something he knows Odin would considered unworthy, he will activate the enchantment and be unable to use Mjolnir until he corrects the problem. Odin need not be involved.
- Enchantments, once given, will last until they are taken away by Odin. There is usually pomp and circumstance when new enchantments are given and when they are removed. Odin is usually quite proud of Thor when bestowing new abilities and angry when taking them away.
In the event of Odin's death, several things will occur. The most important will be the transference of the Odin-Power, the repository of energy that is gained when the All-Father passes his energy to his descendants or to a designated recipient.
In almost every case where this has happened, the transference of the Odin-Power did not invalidate any magic that was already in place. Enchantments remained active and did not degrade. So any that were in place when Odin transfered the power remained active. When the Odin-Power transfered to Thor, for example, Thor had the ability to reorganize, rescind or restructure any existing enchantments.
While Thor was the All-father, he was able to alter any and all enchantments that Odin had in place unless Odin created them to be signature specific and only he could open them. (Yes, Odin has done that more than once, because he faked his death, or had a gambit that would allow him to return to the living or back to Asgard on what he thought was a one way trip.) During such adventures, even the transfer of the powers of the All-Father did not invalidate any enchantments he had signified as his. The enchantments in those cases would only respond to the All-Father upon his actual death.
The Cinematic Asgardians
Since the Marvel Cinematic Universe, Earth #19999 may have different rules for the interactions between enchantments, technology and the weapons of the Asgardians, we will have to see if the cinematic rules for enchantments are different than the canon appearances from Earth #616.