[1] a. It is the third-leading cause of death for young people ages 15 to 24.
b. While parents are off shopping, children ages 3 to 8 can play in the
glass-enclosed child-care center.
c. Nearly one-third of the people ages 15 to 34, and more than half of
those ages 35 to 44 had hypertension.
1. Acceptability. It is true that some native speakers do not find constructions such as those in [1] acceptable (this is evident from the discussions on this website). (EDIT: as documented in Araucaria's answer on this page, this seems to be an AmE vs BrE split, with the construction being very standard in American English, but far less universally acceptable in British English.) Nevertheless, on the whole, balance of evidence shows that this type of construction is nowadays part of Standard English at least in the context of news and in scientific/medical literature. (And at least in American English.) Below, I will present several representative pieces of evidence for this, one of which is an explicit endorsement of this construction from a style manual (Urban Institue Editorial Style Guide).
2. Syntactical analysis. It is uncontroversial that if the sentences in [1] are acceptable, then the boldfaced parts are noun phrases (NPs). It is also uncontroversial that (if the sentences in [1] are acceptable, then) the constructions ages 15 to 24 etc. are themselves NPs, functioning as some sort of dependent in the larger, matrix NP.
I have been unable to find a treatment of this particular construction in the literature. But, for what it's worth, it seems to me that there are at least two ways to analyze the function of these 'internal' NPs within their matrix NPs:
(a) NP as a post-head modifier in a matrix NP. True, NPs are rare in this function, but not unheard of. Examples include expressions such as (CGEL, p. 446)
[2] a man my age shoes this size
the results last year houses this side of the lake
As CGEL says about these examples, 'modifiers with NP form are limited to those denoting age, size, and similar properties' (emphasis mine).
(b) NP as a complement of the preposition of, where we have an ellipsis of the preposition. On this account, people ages 15 to 24 is really people of ages 15 to 24, where the preposition of has been ellipted. In the non-ellipted version, ages 15 to 24 is a complement of of, and the whole preposition phrase (PP) of ages 15 to 24 is a post-head modifier of people, which is the head of the matrix NP. In its discussion of post-head modifiers, CGEL says that (p. 445, emphasis mine)
NPs, however, are rare because with modifiers, as with complements, dependent NPs are usually related to the head by means of a preposition, rather than directly. Modifiers with the form of PPs are extremely common in post-head position.
Of course, one could similarly say that the examples in [2] are all cases of preposition ellipsis (a man of my age, shoes of this size, the results from last year, houses on this side of the lake). Note, however, that CGEL does not do this. They don't explain why. All I can tell you is what I think, and it is this: to a linguist, an ellipsis is always a last resort, something one postulates to explain how a construction that doesn't seem to fit into the larger system of syntax could nevertheless fit into that system. But there is no reason why English should absolutely disallow NPs as post-head modifiers in a matrix NP; certainly there are other languages that allow them (and without any invocation of an ellipsis). Thus, we might as well say that such constructions are allowed, if rare. Other than this principle ('ellipsis is a last resort'), I do not know how to decide whether (a) or (b) should be preferred.
Evidence of acceptability
Garner's Modern American Usage uses the following example in its discussion of enclose/inclose on p. 297 (emphasis mine):
While parents are off shopping, children ages 3 to 8 can play in the glassed-inclosed [read glass-enclosed or glassed, enclosed] child-care center.
The Merriam-Webster Dictionary gives the following sentence as an example of usage in its entry for age (here). The sentence is taken from an article in a major daily newspaper:
Nearly one-third of the people ages 15 to 34, and more than half of those ages 35 to 44 had hypertension.
—Milwaukee Journal Sentinel, "Too young for a stroke? Think again.," 9 May 2018 (source)
The Urban Institue Editorial Style Guide (here) gives the following recommendations for 'age':
AGE
children ages 2 to/through 6, 9 to/through 15 (not aged 2 to/through 6), between the ages of 9 and 15
This construction is not restricted to plurals:
In Clinical Handbook of Psychotropic Drugs for Children and Adolescents: 3rd ed we find
Approved in the USA for children age 7 and above (source)
And in Straight A's in Pediatric Nursing, we have numerous instances of constructions such as
A child age 4 should be able to stand on one foot for about 5 seconds.
For a child age 6, have him stand on one foot with his arms folded across his chest for 5 seconds. (source)
All of the above is just the tip of the iceberg. This type of construction is simply super-well attested in edited scholarly and journalistic publications, written by well-educated native speakers.
Let me close with just one final example: the journal article 'The Processing and Interpretation of Verb Phrase Ellipsis Constructions by Children at Normal and Slowed Speech Rates' by Sarah M. Callahan, Matthew Walenski, and Tracy Love (J. Speech Lang. Hear. Res. 55, 710-725, 2012; full text available here):
Forty-two children ages 5 through 12 years listened to VP ellipsis constructions...
In this study, we investigated how children ages 5 through 12 processed and interpreted sentences with VP ellipsis constructions and an embedded reflexive anaphor.
Our results suggest that children ages 5 through 12 have achieved adultlike performance for the...