This sounds like a question for Duncan Carver – or some other worm-growing pro, if you ask me! I only grow indoors in bins (on a fairly small scale) – and it never rains inside. Are you using Red Wigglers? They usually seem to be pretty good at 'staying put' unless I'm slow to feed them and the worm density in the bin is high…then they do seem to start to consider going elsewhere. I had also tried the European night-crawlers and they all took off on me – so I let them go and have stuck with the red wigglers.
Based on my own observations, it seems as if many kinds of worms do like to move when it rains. It makes sense because they won't dry out so easily if they want to go on the prowl. There may not be all that much you can do about it, when growing outside.
You say that food and moisture levels are 'OK' If the moisture gets too high, (soaking, saturated wet compost piles, it is possible that oxygen levels could drop and that might send them packing. That doesn't sound too likely in your case since you are outside and I assume drainage is OK. If it is super-soggy – you might consider adding some dry stuff to balance out the moisture – and perhaps rigging a tarp over the piles if lots more rain is on the way.
On the other hand, I wouldn't worry about losing a few worms. If conditions are right (moisture, pH and plenty of food, etc.) I'm sure most of your worms will stay put. They are fairly sensible critters and won't leave a good thing. Carefully dig around in your piles and check the worm density. You shouldn't have to dig too far to find lots of worms. If you do – don't worry about it. You mighty even consider expanding the size of the piles. I assume you are in it for the compost – and are not really raising worms to sell, right? If a few of them want to go look for 'greener pastures' – just let them go – perhaps they'll come back – but I'm sure plenty of them will stay behind in the home you made for them.
Best of luck to you!