Oh geez.
Usually I summarize the answers up top here but this is a mess.
From Polymorph:
The target’s game statistics, including mental ability scores, are replaced by the statistics of the chosen beast.
So a polymorphed character is a beast for all game purposes, unless they specify they exclude shapechanged targets or targets under spell effects. Awaken says:
you touch a Huge or smaller beast or plant. The target must have either no Intelligence score or an Intelligence of 3 or less. The target gains an Intelligence of 10. The target also gains the ability to speak one language you know.
Awaken doesn't care about the conditions of the beast except insofar as it is a) Huge or smaller and b) has an Intelligence of 3 or less. The polymorphed character meets both those requirements. But Crawford has previously ruled that no longer being a valid target could prematurely end a spell effect -- does Awaken end Polymorph?
No, because the beast form isn't the target condition of Polymorph, it's the effect. The target condition is being "a creature," which the creature still is. (Although this elucidates a problem with Crawford's ruling in general, since if the target was "a humanoid," Polymorph would never work at all. It would stop being a valid target as soon as the spell took effect.)
So with all that out of the way -- and assuming the DM has allowed Awaken to be cast in such a way that it overlaps with the duration of Polymorph -- what happens in the example case in the question?
- The character is transformed into a valid beast, the form of which is chosen to be Huge or smaller and have an Intelligence of 3 or less.
- The beast is Awakened, giving it an Intelligence score of 10 and a language known to the caster of Awaken.
- Polymorph expires or is dismissed, reverting the character back to their original form.
Easy enough... except for all the unanswered questions.
What happens to the character's Intelligence?
Well -- Polymorph never explicitly specifies what happens to any of the character's ability scores when they revert. It wouldn't be ruled out by the spell description alone that the character's lowered ability scores are permanent... but that doesn't seem to accord with the spell's intent or level. Instead, the usual assumption is that the character *regains the ability scores they had before being Polymorphed, which in this case, would replace their Intelligence of 10 with whatever it was before the Polymorph. Even if it's lower. Poor Algernon.
What about the language they gained?
Well... again, the common assumption is that all proficiencies, abilities, etc the beast may have had, like Stealth or natural AC, are lost when the character reverts. In this case, the language was a property of the Awakened beast form. Unfortunately -- that's gone too.
What about the 30-day charm effect?
...That isn't an attribute or ability of the beast, it's an ongoing effect from an Instantaneous spell. We've got no reason to believe that ongoing effects end when Polymorph ends, only the permanent/innate aspects of the beast form or maintained spells for which the character is no longer a valid target. Neither condition applies, so... they're still charmed for 30 days.
Would the character be Awakened if Polymorphed back into their beast form?
I have no idea.
Let's be honest: Awaken is a mess and Polymorph isn't much better. The DM would have to decide if it's somehow "the same" beast form or if each instance of Polymorph creates a new beast form. Polymorph's "choice" effect and limitations on the target suggest the latter, but c'mon. The spell doesn't even clearly specify whether or not the target regains their own mental attribute scores.
A familiar from Find Familiar can't be awakened.
The awaken spell needs to target a beast or plant:
you touch a Huge or smaller beast or plant
However, the familiar from find familiar is not considered a beast:
the familiar has the statistics of the chosen form, though it is a celestial, fey, or fiend (your choice) instead of a beast.
Therefore you can't use awaken on a familiar from find familiar.
Best Answer
Frame Challenge: There's a much cheaper way for your bear to learn languages
(I'm using bear for continuity with MivaScott's answer and because I find it funny, but it should work with any awakened beast. Replace words here as necessary.)
Even ignoring whether it works, there's a much easier, cheaper, and less tormenting way to teach an awakened bear languages. And it's to have them taught.
The Downtime activity directions in both the PHB (p. 187) or XGtE (p. 134) puts the cost of learning a language at 250 gp, a quarter the cost of each awaken. They differ in time – PHB says 250 days and XGtE 10 workweeks – but if you can increase the bear's intelligence (eg. with a headband of intellect) you can even decrease the XGtE time (and cost). It also requires a tutor, which with a permissive DM could be you, or one of the mentioned druids.† Handing the teaching off to a friendly druid (or a junior member of their circle) frees you off to do your normal adventurer things.
You are relying on the bear appreciating you paying for their education for it to continue its education past the 30 days of awaken charm, but I'd suspect that's an easier conversation to have than to talk it through repeated feeblemind (and possibly to talk your DM through).
†: Of course with a sufficiently permissive DM/play world there may even exist an academy or similar institution for the education of bears and other awakened beasts and I'd expect their tuition be lower than the 1000 gp per language of your proposed solution. If such an establishment does not exist, it is now your duty to found Sir Bearington's Academy for Gifted Wildlife.