I have kept compost inside for classroom studies and if it is too moist they will try to escape. Think of it like drowning for a worm. They breathe through their skin and if their environment is too wet they have to come out of substrate to breathe. Same reason as to why you see worms on the surface of the ground after a heavy rain...

Do you have holes drilled into the plastic tub to allow air flow? (small holes)

Be careful of any store bought organic soil mixture...not all are truely chemical free!

Also all animals need space, the more the merrier the animal will be