A druid can only wildshape on his turn. So, while he can apply unlimited hitpoints to his form by wildshaping every turn, he cannot prevent you from dealing damage when it isn’t his turn. If the druid is knocked out of his form (reduced to 0 hp), the first thing that happens is the excess damage carries over. But now he’s essentially vulnerable until his turn. That’s where the real damage comes in. You can think of wildshape as a regenerative shield of hit points.
Party Versus NPC Archdruids
There are a multitude of ways to “beat” the druid, just like any other encounter. Use your wits, bargain, stealth, combat, etc etc. Those tools are ALWAYS available. Your DM should be ready for you to avoid combat if you wish.
Party Versus PC Archdruids
If you’re talking about PC vs PC combat, there are also a plethora of spells that can assist in killing the druid. For instance, if the druid has less than 100 HP in wildshape OR not, a Warlock can cast Power Word: Kill, and the druid simply dies. No save, just dead. That’s just one spell. There are tons of others. A Druid can’t wildshape if they’re incapacitated. They, again, also can’t wildshape unless it is their turn, so plan your heavy attacks accordingly. When a druid is knocked out of form, they are vulnerable, so maximize your damage in that time or make that vulnerability last longer with controlling spells. Any damage that exceeds a druid’s wildshape form is applied to the druids regular form. Druids are very good at having health, so find a way to attack them in ways where health isnt the primary objective. Use conditions, spell effects, and any means to hinder the druid and he/she shouldn’t be that tough of a fight.
DnD 5e rewards specialization. An Archdruid specializes in wildshape to effectively gain temporary hitpoints among other combat abilities. It’s the whole point of a wildshaping druid. Being a brown bear is cool, but when you can wildshape into one and get its free hitpoints, it becomes a big deal. That’s largely what wildshaping druids are meant to do, so it only makes sense that it gets ridiculously good at it at level 20. All classes have a 20th level ability they get that helps them be even more specialized. It’s a reward for forgoing multiclassing. Therefore, it should feel hard to deal damage to an Archdruid. But it’s not impossible.