There aren't rules, but there are some guidelines and boundaries...
I think you'll have an easy time interrupting a long rest (and thus denying the benefits therefrom), but going into the exhaustion mechanic seems too much. But interrupting even one night's rest should be a lesson to the characters: day two of encounters gets pretty tough, and looking ahead to a possible third day without a long rest should be enough to drive them inside. They're not paying to get the long rest, they're paying for assurance that they'll have a long rest.
Below I detail the rules and scenarios that inform my thinking.
Resting
For a long rest RAW requires at least 8 hours: at least 6 sleeping, no more than 2 of light activity: reading, talking, eating, and standing watch are the examples given. 1 hour of walking, (any) fighting, casting spells, "or similar adventuring activity" are examples of what might ruin a long rest. (PHB p.186)
Exhaustion
The next touch-point we have on the spectrum is that of exhaustion. At the mildest level of exhaustion one incurs disadvantage on all ability checks.
The general description refers to starvation or extreme (freezing or scorching) temperatures (PHB p.291). Further, under Travel Pace we see that the ninth, tenth, &c. hours of a forced march become progressively more-likely of incurring exhaustion (PHB p.181).
Two examples from D&D Expeditions modules also come to mind, one from season 2, one from season 3:
DDEX2-4 Maybem in Earthspur Mines requires the characters travel through a blizzard for approximately three days. Failing a DC12 CON save will gain characters 1d4 exhaustion levels. So three days in a blizzard might get you no exhaustion; might get you disadvantage on all checks, saves, and attacks as well as halving movement and HP.
DDEX3-2 Shackles of Blood lands the characters in a prisoners' caravan where the guards provide them only moldy bread, fetid water, and the guards "jab at prisoners with sticks to pass the time." The journey is "cramped and uncomfortable." Unless the characters alleviate these conditions, they will arrive at their destination with one level of exhaustion.
From these general guidelines and specific examples we see it takes a good deal--much more than an uncomfortable night's sleep--to incur even one level of exhaustion. So the exhaustion mechanic would seem horribly overpowered for your park-sleepers.
Encounters
Recall that encounters don't have to be hostile, and don't even have to bear sentient features. An encounter might just be the lamplighter coming by to douse lamps. Or a caravan of fish coming up from the docks at 4am. Or the night-rending sound of tomcats fighting for territory. Or a few hours' cold rain (good call, @GMJoe). Any of these--and certainly a few of them--could reasonably turn a long rest into a couple of short rests.
And a "relatively safe" urban area certainly has a militia or constabulary--or gang!--making it so. If you're not getting pick-pocketed or stabbed, it's got to be because the local authority is keeping a lid on those problems. And you're "those sorts of problems."
Economy
A night's lodging has a price. What are your characters paying for when they purchase a night's lodging? If you can answer that, you know what to take away when they eschew a roof and a bed.
In the case of a specific story, you have to ask what makes sense.
In terms of the mandatory 24-hour waiting period between long rests...players can always wander off and go burn the rest of the day foraging, chatting, and otherwise being idle. If they elect to take a long-rest part way through a 'dungeon crawl' make sure you consider exactly what that means for them.
For the number of encounters they can handle in a day, per the DMG, it recommends:
most adventuring parties can handle about six to eight medium or hard encounters in a day. If the adventure had more easy encounters, the adventurers can get through more. If it has more deadly encounters, they can handle fewer. (DMG84)
Remember that this is a guideline. And guidelines tend to be broken on occasion.
So, for the specific case of a published adventure, here are some considerations:
1: Look at the encounters, compare them to the XP Thresholds for encounter difficulty in the DMG. If the single dungeon (in this case, the hatchery) contains a few Easy encounters, then the party can handle it in one day, no problem.
2: Consider what makes sense. The party is raiding a hatchery that is heavily guarded. If they roll through, clear half the hatchery, then pitch a tent in a random back room...they are going to either get ambushed, or the hatchery may be evacuated while they are sitting there wasting the day. Or, at the very least, the hatchery will be on high alert and ready for them when they elect to continue...meaning ambushes, traps, fortifications, etc.
So, here are some possibilities.
First, the module may be intentionally straining your players. This happens sometimes. Forcing players to push through when they are short on resources can sometimes lead to some very creative solutions. Alternately, your players might just be burning through resources faster than they should....you really shouldn't be wasting spell slots when a pair of kobolds attacks you. If your players find themselves running short on resources, but still running into encounters, they are likely to become more conservative with their power.
Second, if necessary, allow your players to waste the rest of the day so they can take a long rest. But...consider the ramifications of them doing so. At the very least, they will put the place they are attacking on high-alert. Surprising enemies will become impossible, and I would expect the enemies to dig in and fortify their positions. They might set up ambushes ahead of the players. Or, they might decide that this location is a lost cause, and sneak out. Whatever the case may be, make sure your players know that taking a nap in the middle of an assault is probably not the best plan ever.
So, to give the general gist of it...
Yes, players can always choose to waste the rest of the day so that they can take a long rest. But you have to consider how the NPCs will respond to having a full day to discover what has been happening in their lair.
Best Answer
Make the adventuring day of variable length
The adventuring day is the length of time between long rests during which resources are expended (such as HP, spell slots, etc). As you mentioned, the resting variant rules in the DMG present one way that the length of the adventuring day can be different from the length of an in-game day by adjusting the required length of short and long rests. The length of a long or short rest need not remain the same throughout an entire campaign. If one of the variants presented is appropriate for part of your campaign, but not another, then you are free to use that variant for only the appropriate part. In your example, you can use 8 hour short rests and weekend long rests while traveling, and standard rest lengths while in dungeons. I have tried this and it works.
I have, however, found something that works better for me. Rather than changing the lengths of rests, I explain to my players that the game is more fun when it is challenging, and get their buy in to deny their characters long rests whenever I see fit. Weather, insects, or even earthquake activity provide in-game justification for why the characters don't gain benefits from an attempted rest. This gives me more complete and satisfying control over the length of the adventuring day without having to actually change any rules to do so.