Yes if you are a parrot. No if you are a slug.
I'm using 'druid' here as shorthand for 'Circle of the Shepherd Druid'
Your ability to speak is
limited to the capabilities of your beast form
The 'capabilities of your beast form' are the limitations of its body, and not the limitations of its mind. We know this because when you take on the form,
you retain your [...] Intelligence, Wisdom, and Charisma scores.
source
This begs the question: Which beasts are physically capable of speech? Some beasts, such as a slug, are obviously not. Giant eagles, on the other hand, can speak giant eagle. This means that their ability to vocalise is sufficient for communicating complex ideas.
Parrots are another helpful example. A parrot is physically capable of mimicking human vocalisations, but doesn't actually speak common and wouldn't have this language listed in its stat block. Druids in parrot-form can speak common (or any other language), because their parrot-bodies are physically capable of producing the sounds required and their druid-minds are capable of constructing thoughts like 'what is the nature of beauty?'
What Constitutes Speech?
Your ruling as DM will depend on how you interpret the meaning of 'speech': either as a discrete category (this beast CAN/CANNOT vocalise speech) or as a conceptual continuum (this creature is MORE/LESS ABLE to vocalise complex patterns)
Speech as a discrete category
Speech implies abstract communication and complex thought. My cat makes little noises with different meanings, but her rudimentary voice box will not allow for 'speech' in the same way that a parrot's would. A cat-druid is incapable of 'speech', and so any dog she spoke to would be incapable of understanding her. A parrot-druid would have no such trouble. If a dog-druid were talking to a dog, I would say that 'understanding noises and motions' grants an ability to emulate them, which implies that a dog-druid could say anything to a dog that one normal dog could say to another - little dog concepts like 'GO AWAY I DO NOT LIKE YOU' or 'WOW LOOK AT THIS'.
Speech as a contiuum
Alternatively, you might thing of 'speech' as any articulation of concepts through vocalisation - ie. my cat can speak, just not very articulately. In this case, the DM would have to make a ruling on maximum-speech-complexity based on physical vocalisation limitations of the chosen form. I.e no speech for slug, basic concepts for cats/dogs, human-equivalent complexity for parrots. In contrast to the above ruling, this would mean that all animals could understand the concepts communicated, even though a slug, for instance, could not normally understand a cat.
Conclusion
- A wildshaped druid's ability to speak is limited by the chosen form's physical capacity for complex vocalisation. One possible ruling is that a creature can or cannot speak, with nothing in between, but an alterative ruling is that vocalisation-capability moderates the maximum complexity of communicated concepts.
- If a wildshaped druid can speak, then their speech can be understood by all beasts.
- If a wildshaped druid cannot speak, they can still communicate with other animals as any other animal might, because they 'understand' the 'noises and motions' of animals.