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.
Attuning does not interrupt a short rest
Under the attunement rules, it says:
If the short rest is interrupted, the attunement attempt fails.
If the process of attuning to the item itself is enough to interrupt a short rest (ie, because attuning is not "light activity" as required by resting), then the item remains unattuned after the short rest as well, as stated in the quoted rule.
This means nobody can attune to anything because attuning interrupts itself: it is non-light activity you must take over a period of time that requires light activity (ie, it's a contradiction, this rule is nonsensical).
So we must conclude that attuning to an item does not interrupt the short rest, and therefore attuning to an item must fall under light activity, as otherwise the design of this mechanic prevents anybody from using it.
If the short rest is not interrupted, they gain the benefits of a short rest
If attuning to an item does not interrupt a short rest, and nothing else interrupts it as well, then a PC can gain the benefits of such a rest. This includes recharging abilities, using features that key off short rests (eg, Inspiring Leader feat, Bard's Song of Rest), and, yes, using Hit Die to heal HP.
There are no disadvantages listed while attuning to an item
Focusing on an item during attunement does not impose disadvantage to Perception checks while they are on the lookout during a long rest. There is no mention of this in the DMG. But, the DM is free to impose any disadvantages he feels necessary as part of the focus attuning requires.
Impact to the game
I feel that if my DM imposed this penalty on me, I would just ask the members of my party to attune to items over short rests only, and to never do it during long rests. And then this penalty would never come into play, which makes it, on the whole, an immaterial penalty (unless an adventure is specifically designed with this in mind).
Best Answer
Yes you can
When you attune you take a short rest. When you take a short rest you can spend HD to heal.