RAW the reduction carries over; arguing otherwise is special pleading
There are many different effects that might persist on a druid when they change form using wild shape. The clearest examples are Conditions, because the rules for ending them are explicit:
A condition lasts either until it is countered (the prone condition is countered by standing up, for example) or for a duration specified by the effect that imposed the condition.
A reduction in hit point maximum is not a condition, but in the absence of an explicit rule regarding it, we can look to the example of Conditions as a guideline. Other persistent effects behave differently when the recipient's form changes (cf. Disease), but we know they behave differently because they say so; There Are No Hidden Rules. So unless something else in the rules says otherwise, we can assume that a reduction in maximum hp will last until it is countered (in this case if the description of wild shape said it removes the effect) or until it reaches its duration (which is listed in the specific effect that imposed the reduction).
Taking the second part first, reductions in hp maxima from undead (cf.vampire) and fiends (cf. succubus) typically last "until the target finishes a long rest". The reduction from a clay golem (a construct) lasts "until removed by the greater restoration spell or other magic", while the Harm spell inflicts this effect for one hour, but also specifies that it can be ended before then by "[a]ny effect that removes a disease". To my knowledge, no effect that reduces one's hp maximum specifies that it can removed by changing form, such as through wild shape, polymorph, shapechange, etc.
As far was the wild shape itself, we are given explicit indications of what is carried over to the new form (your alignment, personality, and Intelligence, Wisdom, and Charisma scores, all of your skill and saving throw proficiencies, your concentration on a spell you’ve already cast, and the benefit of any features from your class, race, or other source) as well as what is not carried over (your game statistics apart from what was listed above, your hit points and Hit Dice, your spellcasting ability, your special senses). For a few things you actually get to choose whether to retain them or not (your equipment). This is a pretty long list, but it is not complete - while your hit points (not carried over) includes your hit point maximum, it does not explicitly include temporary reductions to your hp maximum. We are thus in the position of having to judge whether this effect is carried over or not - and the only principle that makes sense is to assume that it does unless it says otherwise.
Consider this with Conditions - if your druid was Prone, or Charmed, would wild-shaping into a new form counter the Prone or Charmed condition? No, because the rules for Conditions explicitly say they would not. If your druid was under the persistent effect of a spell like barkskin while in their natural form, would it apply when they assumed their wild shape? Yes, because the precedent of Conditions makes us expect effects to carry over unless something says they don't. Likewise for a pre-cast mage armor, or a guardian of nature spell, a shield of faith, or other spells.
Thus, RAW, the reduction in hp maximum should indeed carry over to the new form.
RAI or special pleading?
PurpleMonkey, the author of the accepted answer to this question (which says that the reduction would not carry over) in another accepted answer about barkskin says:
Wild Shape also says nothing about ending any effects that are already applied to the target, so things like Conditions and spell effects would carry over from one form to the next
So why would they think that reductions to hp maxima would be different, why is it not a 'thing like' Conditions and spell effects?
Because Jeremy Crawford tweeted a very explicit statement that they are different:
Wild Shape—a reduction to hp maximum doesn't carry over from your beast form to your true form or vice versa.
Now, we know that Crawford's tweets aren't official, but that doesn't mean they aren't useful. I, for one, find them very useful when trying to tease out intent in RAW that is ambiguous, confusing, or poorly worded. But none of these are the case here; the RAW clearly indicate that the reduction should carry over. Worse, if you follow the whole twitter exchange, Crawford's argument (in my opinion) quickly becomes self-contradictory special pleading. When asked why a reduction in a hp maximum doesn't carry over, he says:
The forms have their own hp pools. Their current and max hp change independently of each other.
This invents a new term, "hp pool", that has no game definition. It then begs the question of, if current and max hp changes are truly independent of one another, why then does wild shape specify that excess damage done to one form carries over to the other form? To this he responds:
One hp range absorbs as much of the damage as it can, and the other hp range picks up the slack.
So, okay, if you exceed the damage that one form takes it is taken up by the other (even though they are independent). But wouldn't this mean, then, that if a reduction in maximum hp in one form took that form below zero, then the other form would 'take up the slack' and suffer a reduction in maximum hp to make up the difference? Apparently not, since in the same exchange he says that in this case
Wild Shape—you die if a vampire spawn reduces your hp maximum to 0 while you're in beast form
It becomes clear that this ruling - reductions to maximum hp simply don't carry over - is his position, but it is not really connected to any other rules. If you, as a DM, like this ruling, then you should implement it. But you should also understand that it is not RAW.
This becomes even more clear when you consider effects that raise your hp maximum, like being the recipient of an Aid or Hero's Feast spell. I think any player whose druid was under the effects of one of these would not expect their benefits to end when the druid wild shaped. And a DM who adopted Crawford's ruling that reductions in hp maxima don't carry over is in a tricky position then, since Crawford did not tweet anything about increases, so there is not even a RAI justification. RAI as informed by tweets are great when they help us understand the consistency the underlies the RAW. When they simply present special cases not connected to anything else, I think they do more harm then good.