The white worms are grubs (larvae) usually from the common housefly. If it ocurred just a day later they were probably already present in the soil.
Fertilizer cake is usually replaced every month or so after it has begun to break down. Some folks who mix it themselves put a bit of powdered Sevin (a commercial insecticide) in along with the rest of the recipe. I don't have a big problem with bugs in mine, just squirrels who try to carry them off.
TreeBay Bonsai Tools & Supplies sells some mesh fertilizer covers designed to keep the larger bugs out. You'd find them in the supplies tab with the organic fertilizer.
Regards,
Matt