Casting Panglacial Wurm while searching your library follows all the normal rules for casting a creature spell, except for timing (casting the Wurm this way always occurs during the resolution of another spell or ability) and what zone the Wurm is being cast from. The spell goes on the stack. You have to pay the Wurm's mana cost and any applicable additional costs, which means you can activate mana abilities while you're casting the Wurm while you're searching your library.