Which is worse for a rechargeable battery: overcharging it or undercharging it?
Modern iPhones and iPads can't be overcharged unless something is defective, so leaving them plugged in is fine. Undercharging just means less time between charges, and today's batteries don't have the old memory effect. Overcharging is the more dangerous of the two in theory, but in practice you don't need to worry about either.