What is the plural of 'only child'?
I could not find it on my preferred dictionary sites, but I found that according to Wiktionary (the Wikipedia of dictionaries) "only children" is indeed the correct plural of "only child". After a little more searching I found Cambridge's dictionary site confirming it over here.
So yes, "in my class there are seven only children" would be correct. Personally I would avoid using "only children" where possible, because I suspect it is not commonly used and relatively easily misunderstood. In this case I would say something along the lines of "in my class seven are an only child." But if the meaning of the word is clear from the context there should be no objection to using the plural form "only children".
It's just only children.
You can find any number of examples of its extensive use in the situation where that topic is under discussion—just see Roaring Fish's answer. In an article entitled: Here’s Why Only Children Are More Successful almost every use is a plural.
As a suggestion, once the subject has been established, you could use "onlies" or "onlys" in writing - as it's a word created on the spot, you can spell it as you wish.
It's also worth noting that:
Ambiguity is staggeringly common and spectacularly uninteresting in English. "Where did the dog bite you?" hahaha. Who cares?
It's commonplace that multi-word plurals are a bit messy in English. (e.g. "Sisters-in-law") Sometimes you may add hyphens - sometimes not - whatever.
You can state endless examples of multi-word (joke) plurals (hyphenated or non) which can be ambiguous because of the first word(s) or which are infrequently used , so they might "sound strange" if they've never come up for you before.
If you Google using exactly the following phrase:
education studies, "only children"
you'll find billions of examples being used in its plural form.
Note that
Occasionally it's hyphenated.
Longer variations like non-only children, non-only-children, and non only-children are common also.