The harm spell, flavourfully, states it creates a virulent disease
You unleash a virulent disease on a creature that you can see within range.
It later calls out that
Any effect that removes a disease allows a creature’s hit point maximum to return to normal before that time passes.
But no where does it state that being immune to disease (via the Paladin’s Divine Health class feature or otherwise) prevents either the initial damage or the reduction in maximum hit points.
This is in contrast to spells that spell out if immunity works, e.g. sleep.
Does immunity to disease protect you from the harm spell?