You may cast it, even if a spell is currently resolving.
Panglacial Wurm's ability is an ability that modifies another keyword action. It modifies searching in the same way that regeneration modifies destruction.
Nothing prevents keyword actions (draw, destroy, cast, search, etc) from being taken while a spell is resolving. And there's nothing special about cast in this respect.
But the confusion is understandable. The following explains why "you may cast" is weird.
"You may X" is usually an instruction to do the thing there and then.
Whenever enchanted creature deals damage to an opponent, you may draw a card.
Whenever a creature is put into your graveyard from the battlefield, you may sacrifice Angelic Renewal. If you do, return that card to the battlefield.
"You may cast ..." is usually an exception.
Flashback Keyword Ability:
“Flashback [cost]” means “You may cast this card from your graveyard if the resulting spell is an instant or sorcery spell by paying [cost] rather than paying its mana cost”
This modifies what you can cast when you have priority.
Author of Shadows:
When Author of Shadows enters the battlefield, exile all opponents’ graveyards. Choose a nonland card exiled this way. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell.
If you control a commander, you may cast this spell without paying its mana cost.
This just replaces the cost to cast.
But not always.
So which one is it for Panglacial Wurm?
While you’re searching your library, you may cast Panglacial Wurm from your library.
When it's not an instruction, "you may cast" usually modifies what you can cast when you have priority, or it modifies the cost to cast a spell. This isn't any of those things.
Instead, it modifies the "search" keyword action to add the option to cast a spell as part of that action. It doesn't matter what causes you to search, and it doesn't matter if a spell is resolving.