We know “a 5-stars hotel” is wrong, but “a 5-star hotel” is right.
Now I wonder why the following adj is considered correct:
40% of the people impoverished after one year of 7-days-a-week care.(NOT 7-day-a-week care).
Please help me with this!

5 stars >[+adjectivalization]> 5-star >> a 5-star hotel
7 days a week = 14 days every two weeks >[+adjectivalization]> 14-days-every-two-week = 7-days-a-week >> 7-days-a-week care

Adjectivalization of a group of nouns (words) is carried out by singularizing the last noun.

Here the salient point is that “hotel” is countable, that’s why “To be put up in a five star hotel” is right. Or “he’s a five year old boy” or “It’s a five foot wall” - “boy” and “wall” are both countable

Compare it with “It’s five days’ work” - “work” is uncountable.
Or “I took five weeks’ vacation” or “I took a month’s leave” - leave and vacation are both uncountable.