To add to what Kieranmillar said, unlike "draw 1 card", "put the set-aside cards into your hand" refers to specific cards. And those cards are undefined if you don't set aside any.
I had almost posted a longer answer talking about how Gear's effect would become "undefined", but I had a problem with the fact that "put these 0 cards into your hand" seems to be just as clearly defined as "put these 2 cards into your hand". Haven is different; Haven refers to "it", meaning "the set aside card", which is NULL if you had no cards in hand or deck when you played Haven. The "put it into your hand" is actually an undefined instruction because the "it" simply doesn't exist.
While I think that the rules for Gear are going for the same thing, I feel like it doesn't work out in a strictly logical reading. Gear says "them", not "it", and "them" is defined as the set of cards (up to 2 cards) that it set aside. That set can be size 0, 1, or 2. In any of those cases, it's a clearly defined set.
So really I think it comes down to an unwritten but obvious rule that says that "put 0 cards into your hand" is equivalent to "do nothing". Similarly, a duration card that says "at the start of your next turn, +0 cards", wouldn't stay in play, because "+0 cards" is equivalent to "do nothing".
I was not talking about Gear specifically, but all these cards: Cargo Ship, Haven, Archive, Ghost, Crypt, Gear, Research. You're right that Gear and Crypt are different, since they allow you to set aside 0 cards, so the cards would not be undefined. So I should have said, all these cards refer to
specific cards, which could be either undefined or a set of 0 cards. This is unlike "draw 1 card", which does not refer to any specific cards.
You're right that we need the rule that "do 0 of something" means "do nothing", but I don't think that was the question here. The question was, isn't "draw 1 card" with an empty deck the same as "draw 0 cards" (or equivalent to "put 0 cards into your hand")? I don't see how that rule resolves the issue.
I think the clue is actually timing, like Mxdata said. Caravan is not trying to draw you a card
now, it just says, "next turn draw 1 card". Gear is saying, "next turn put 0 cards in your hand", and Haven is saying, "next turn do nothing/undefined".