Really good question. It's hard to answer because manufacturers play games with how far in either direction they decide they can get away with stretching those numbers. Sometimes what they're basing those decisions on might be something rational and expertise-driven that has to do with wall thickness or seam construction or whatever, and other times it's two brands calling the same tube 700x18-23 versus 700x18-25 because the latter knew they could get away with it and wanted to have one less tube SKU to worry about.
In general you're safer choosing the tube where the upper end of the printed range matches the printed size of the tire. This tends to give a result where the tube, when inflated just enough to give it shape but not stretch it, fills out the tire nicely give or take a negligible amount of stretch, and is easy to install. That last point should not be underestimated; damage or blowouts from difficulty installing the tube is one of the major ways things can go wrong here, and it happens more when the tire is in the smaller end of the tube's range than the larger. Once it's in there, tubes really don't care that much about being a little stretched or a little large. It's true that the distinction is non-zero, and stretched is probably worse for durability in that sense, but it really is pretty close to zero as long as it's within the printed range, and meanwhile the extra rubber is extra weight and extra hassle/risk during installation. Having extra rubber per se really doesn't add durability and shouldn't be aspired to.
So the literal answer is probably that, given exact perfection is impossible, erring on the larger side is marginally more durable, but in practice it's more complicated than that because some much more meaningful percent of tube issues happen as a result of difficulty cramming in a bigger tube, which isn't likely to be an issue in the case of putting, say, a 23-25 tube in a 23, but can come into play in a more major way in some instances. And likewise, in actual practice, having a tube that tops out at the tire size you've got will virtually never cause issues, and has other advantages.
Manufacturers/brands tend to make more falsely optimistic choices when it comes to choosing what to print for the lower end of the range. A tube box that says "2.1-3.0" is a code from the manufacturer to the retailer for, "This may physically work in a 2.1 once you finally get it crammed in there, but it's going to be inconvenient and heavy, and we basically only did this to have fewer SKUs, plus 2.1 is way out of fashion and only needs to be catered to as an afterthought so who cares." Or they may have just put 2.1 on there instead of 2.5 because they thought the appearance of stocking versatility would give them an edge over the competition and they didn't care about damaging their credibility because everyone in the bike industry is always going broke, which encourages short-term thinking. That 2.1-3 is a huge range. If it's going to be an optimal fit for a 3.0, or even if it's optimal in a 2.8 and can be stretched to a 3.0, you're safe inferring they only got the other end of the range down to 2.1 by straight fudging the numbers.