This question, like many others, will very much depend!
It will mostly come down to moisture levels and nutrition, which will be provided for with quality bedding because a good bedding will hold moisture and provide a long term source of food.
Moisture
This is the biggest factor in how long they will last without your intervention. Worms prefer a moisture level around 80% (a few drops of water coming out when you squeeze the material), and can survive down to around a 40% moisture level or slightly less (no water comes out, material only clumps together somewhat as you squeeze.
How long they will survive without you adding water is the exact same amount of time that the worm bin, or a portion of it, will stay above 40% moisture. So do what you can to keep the bin from drying out quicker than you will be gone, without restricting too much oxygen from the bin.
Things that will help maintain moisture content:
Starting out at the correct moisture level - around 80% throughout the whole bin.
Extra moisture absorbent bedding (coco coir, shredded cardboard, or even worm castings/compost) will help greatly to keep the bin at a good moisture level.
A bin that has greater depth of bedding will last longer as it will take longer for it to fully dry out.
Cooler temperatures (between 40-50 degrees) will help to make the bin not dry out as fast, and will also slow down the worm's metabolism to not eat/need to eat food as quickly.
A bin with a lid/a worm blanket will stay moist much longer than a bin without either. Restricting airflow will help it to not dry out, but make sure the worms and the bin can still breathe.
Its hard to say what steps you should take for how long you will be neglecting the bin because there are so many factors. Hopefully you have had enough experience with how much water your worms need to have added and how often that you can make an educated guess on how much prep work you need to do to keep the worms hydrated enough while you are gone.
But, if you prepped your bin with all of those steps, it could likely maintain a proper moisture level for several months.
Food
Worms can go a while without a good meal. If you'll be gone only for a week or less, you probably won't need to add anything at all besides their usual food before you go. For any time longer than a week, adding plenty of high carbon bedding will be a safe bet (which will also help maintain moisture levels).
Just estimating numbers - for every week you are gone and for every 1 pound of worms you have, an addition of 1 gallon of bedding should keep them happy.
And adding a lot of bedding will never cause problems, so doing a bit more than 1 gallon could provide you with some peace of mind - especially as it will help provide more stable moisture content.
https://www.utahbioagriculture.com/guides/how-to-worm-compost/all-about-worm-bedding