The answer will lie in whether a Language counts as a Skill Proficiency.
Wild Shape
Your game statistics are replaced by the statistics of the
beast, but you retain your alignment, personality, and Intelligence,
Wisdom, and Charisma scores. You also retain all of your skill and
saving throw proficiencies, in addition to gaining those of the
creature. If the creature has the same proficiency as you and the
bonus in its stat block is higher than yours, use the creature’s bonus
instead of yours. If the creature has any legendary or lair actions,
you can't use them.
You can’t cast spells, and your ability to speak or take any action that
requires hands is limited to the capabilities of your beast
form. Transforming doesn’t break your concentration on a spell you’ve
already cast, however, or prevent you from taking actions that are
part of a spell, such as call lightning, that you’ve already cast.
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. ;)
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.
Best Answer
RAW, you can speak any language you know, but it is unclear as to whether you are disallowed from speaking Common, Elvish, and Sylvan.
The relevant section in wild shape (PHB 67) states:
The relevant section in the sage advice compendium 2019 (page 3):
So you retain your knowledge of all languages (this includes not knowing Giant Elk).
However, it is unclear whether it is a limitation of the capabilities of the beast form that prevents it from speaking the three languages or something else.
My opinion on the matter, as a DM
If it is the physical capabilities of the creature that prevent it from speaking those 3 languages (we see this in the real world with dolphins, for example, who speak "dolphin", but can also understand the humans, but cannot speak English), then it perhaps could be assumed that Giant Elks work the same way, and therefore are limited to not speaking any language.
If it is a mental thing that prevents the creatures from speaking the 3 languages, then it does not make sense that a new mind inhabiting a Giant Elk's body would be subject to the same limitation.
I, therefore, would either say that you can speak no languages, undercutting the RAW ruling, or could speak all of the ones you know, ignoring the potential 3 language restriction ruling.