In real life, fungi are not plants; they are their own separate kingdom (I'm no biologist, so here's a quote from Wikipedia, for what it's worth):
These organisms are classified as a kingdom, fungi, which is separate from the other eukaryotic life kingdoms of plants and animals.
Now on to D&D 5e…
Speak with plants (PHB, p. 277) says:
You imbue plants within 30 feet of you with limited sentience and animation …
If a plant creature is in the area, you can communicate with it as if you shared a common language, but you gain no magical ability to influence it.
The spell repeatedly mentions plants, and also makes a mention of plant creatures at the end.
The creatures Myconids (MM, p. 230) and Fungi (MM, p. 137) are both listed as plant type creatures under their stat blocks, and yet they are clearly fungi rather than plants from a narrative perspective. Here's a D&DBeyond search that lists all of these creatures.
Does this mean that speak with plants would work on a mushroom? Not a "creature" (since that's made explicit by the fact that it says "plant creature" and Fungi/Myconids are listed as plant type creatures), just a mundane mushroom, such as some Barrelstalk (Out of the Abyss, p. 22) and whatever else is listed under that section of OotA.
The reason I ask is because I'm running OotA and one of my players is currently playing a deep gnome ranger who is very enthusiastic about mushrooms, and we hit level 11, at which point rangers can pick another 3rd level spell, and the player spotted speak with plants and wanted to use it to talk to mushrooms.
Given that we're in the Underdark and will be staying down here for the rest of the adventure and then some, we're not going to be seeing any plantlife for a long time, so I've ruled that it does work on mundane mushrooms as it would on mundane plants, since otherwise the spell is useless down in the Underdark, but I just wanted to see if this is RAW (or at least RAI) as well.