It should be fine, as long as time allows.
Nothing in the rules says that a long rest cannot immediately follow a short rest. In this case, what the characters are doing during those rests are very different.
Indeed, a short rest and a long rest are what many real-life people do before bed: an hour or so of non-strenuous activity, like reading, and then going to sleep. It's not a stretch to say that a D&D character can't spend an hour studying their magical item, and then go to sleep.
The only time where that might be a problem is if the characters don't have the full 9 hours.
Different things are happening during the two rests.
What's really key here is that the activities during the two rests are different. In the short rest portion, the character is studying the magic item, meditating on it, or whatever is required for attunement. In the long rest portion, the character is doing something else, such as sleeping. The attunement process is still active work, just not active relative to adventuring.
I think that this distinction is why attunement is limited to short rests, and why a character should be able to do chain them together.
You're correct.
Your analysis is correct--a warlock can cast some long-duration spells by effectively spending hours instead of spell slots.
This is not unbalanced (for a single-classed warlock).
First, the spell slots that the warlock recovers on a short rest can only go up to level 5. Any long-duration spell above level 5 is subject to Mystic Arcanum, which only allows the warlock to cast it once per long rest (as explained here).
So which spells on the list are both level 5 or less and last longer than an hour? My quick perusal through the list shows only Hallucinatory Terrain, Hex, and Dream. Dream is arguably a special case, and Hex only works on one target at a time because of concentration, so your example of Hallucinatory Terrain is essentially the only spell that can be "exploited" this way. Opinions may vary about whether this "exploit" is especially powerful or not, but given that it the spell is quite limited in scope and it requires uninterrupted rests, I'd hardly consider it to be abuse.
Multiclassed warlocks can benefit this way
As Bloodcinder points out, multiclass warlocks can use their warlock spell slots to cast spells from their other classes (PHB 164):
If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature...
Thus, a warlock that has levels in wizard could cast a spell like Mage Armor, take a short rest to regain that spell slot, and then enjoy the benefits of Mage Armor for another 7 hours afterward.
As for whether this is balanced, I'd have to assume that the designers considered this possibility because the rule was written out so explicitly. After all, multiclassed spellcasters are delaying (or sacrificing) their ability to cast higher level spells, so there is some tradeoff to be considered.
Best Answer
Be an Elf
Elves have the "Trance" racial trait, which means they meditate instead of sleeping, and "gain the same benefit" from four hours of meditation as "a human would from 8 hours of sleep."
Per the Sage Advice Compendium, this means that four hours of meditation count as a full long rest:
See also: Is 4 hours long enough for a long rest for Elves?
I don't know of any other reliable methods for shortening a long rest, though this other post has a few far-out, might-work-sometimes suggestions: Are there any 5e spells whereby PCs can gain the benefit of a long rest without actually taking a long rest?