You gain any one language that any of your favored enemies speak.
When you gain this feature, you also learn one language of your choice that is spoken by your favored enemies, if they speak one at all.
Breaking this down:
- You gain one language.
- It is a language of your choice. You get to pick.
- Its only constraint is that it must be spoken by your favored enemies.
It does not say that you must gain the most common language of your favored enemies. In fact, that would contradict the rule that you get a choice.
Nor can it reasonably be interpreted to be a language that all your favored enemies speak. Many creatures speak only one unique language that is not shared by any others of their type.
Nor does any rule say it has to be a standard language listed in the Player's Handbook.
Therefore, you pick a language that is normally spoken by any creature within your category of favored enemies. If you take Favored Enemy: Monstrosity, you could take Umber Hulk language, although you will not often find it useful, and would be recommended to take the most common language possible.
Obviously, there's some DM judgement here. For example, the bandit entry says it can speak any language, but it's up to your DM what language the bandits of his world speak (probably not an ancient language like Auran, for example). The couatl speaks all languages, but obviously you cannot learn all languages just because you hunt couatl. And just as the favored enemy rules suggest that a ranger should take favored enemies of creatures they have actually encountered, it would be most logical for them to learn the languages of creatures they have encountered. The DM might also impose his own rules about what languages you can and cannot choose.
Your reasoning seems sound to me
As a wildshaped druid, you:
retain your alignment, personality and Intelligence, Wisdom, and Charisma scores
(PHB, pg. 67)
In other words, your retain your mental capacity and your character's mind, and thus your memory, creativity and reasoning abilities, so there's no reason that, given the Raven's Mimicry trait, you wouldn't be able to "mimic" the sounds you've heard in life to effectively speak (in any languages you know as a druid) as a Raven.
The only way in which this falls down is that some may argue that language doesn't come under simple sounds, as mentioned in the Raven's Mimicry trait's description:
The raven can mimic simple sounds it has heard, such as a person whispering, a baby crying, or an animal chittering.
However, real life ravens can mimic human speech, so what is considered a simple sound vs. a sound too complex for a Raven to mimic, and where the sound of a person saying a word falls into that, is for each DM to decide.
At the very least, I would argue that a single word is a simple sound (simple enough for real life raven's to mimic anyway), and it's the druid's intelligence that can then string those into a sentence, so I would still argue that the fact that the Raven's Mimicry trait calls out "simple sounds" wouldn't stop this from working as you intend.
It's worth pointing out that this differs from Kenku, since Kenku have a curse that prevents them from being able to create new sounds, as they are cursed to be unable to express creativity (as this question goes into).
Best Answer
The answer will lie in whether a Language counts as a Skill Proficiency.
As DM, I do consider Language as a Skill Proficiency, and so your original Language Proficiencies are retained, in addition to gaining those of the creature's. You know your base languages, as well as the creature's, while in Wild Shape.
If the DM does not consider Language a Skill Proficiency, then the Wild-Shaped Druid can speak and understand only the Beast Form's known languages because her game statistics are replaced by the statistics of the beast, with several exceptions that do not include languages, and part of a stat block is an entry for Languages. In fact, from this point-of-view, her party mates will not be able to communicate with her except thru the Animal Handling skill while she is in Wild Shape.
Take note that in either case, a Beast Form is usually unable to speak Humanoid languages because of the structure of their vocal organs (e.g. tongue, mouth, etc.). Also, once the Wild Shape goes away, you revert to your original game-statistics, which no longer include the Beast Form's languages. So, it is safe to say that the question of the Beast Form's languages lies only within the time frame of the active Wild Shape. ;)