Specifically for custard, you pretty much want the known good time from your recipe, but cooking longer will be fine.
In general, there are two major things:
- how long does it take to get everything up to the desired temperature?
- how long does it need to stay at that temperature?
The time to reach the desired temperature is pretty much just determined by size/shape. If there's a point in the middle that's 5cm from the closest surface, whether it's a 10cm diameter sphere or a 10cm thick slab, it's going to take longer. (The two aren't exactly the same in terms of heat propagation, but it's a good rough way to think about it.) I'm guessing liquids like your custard base also cook a little faster than solids, since there can be a little bit of convection flow inside the bag, not enough to be well-mixed, but better heat transfer than a solid.
The time at the target temperature depends greatly on what you're cooking. With many things, you just have to reach the temperature and then you're done. Holding at the target temperature after that might make no difference, or it might result in slow loss of quality. For example, you can hold steak quite a while at temperature, with not much change. On the other hand, you don't want to hold fish forever, because it'll tend to lose texture. And with something like pork shoulder or brisket, you actually need the long cooking time in order to slowly break down connective tissue and get it tender.
So, if you already have a time you know works:
- Cooking shorter means underdone, either under temperature, or not tender.
- Cooking longer means avoiding the risk of undercooking, and is generally fine, especially in moderation. For some things, it may overcook, like making your meat fall apart too easily.
For custard, the former is obviously bad (you want it to actually set), but the latter is not really an issue (it's not going to rapidly un-set).
As a footnote, there are some sous vide recipes designed to not actually reach equilibrium temperature. For example, you can cook eggs at a temperature high enough to set the whites, but for a shorter time to avoid firmly setting the yolks. Those are more like "normal" cooking in terms of over- and under-cooking, e.g. for the eggs, too long and you set the yolk, too short and you don't set the whites.