The victim's hit point maximum in your scenario is reduced by the full amount of the damage inflicted, even if the creature takes no actual HPs damage due to it being "absorbed" by temporary HPs.
As @Shem points out in the comments below, Jeremy Crawford has agreed with this interpretation in this tweet:
Q: You are hit by a Specter's Life Drain for 10 damage. You have 8
temporary hit points. Is your Max HP lowered by 2 or by 10?
A: By 10
So adopting the interpretation detailed below (my original answer prior to seeing the official ruling from JCrawford) would be a house rule. I leave it here to show the history of answering this question and for possible minor interest...
A House Rule alternative to the official ruling: The victim's hit point maximum in your scenario is unaffected.
Vampire Bite (Monster Manual p.297)
Hit: 7 (1d6 + 4) piercing damage plus 10 (3d6) necrotic damage. The target's hit point maximum is reduced by an amount equal to the necrotic damage taken, and the vampire regains hit points equal to that amount.
If a target has temporary hit points then any damage taken is first deducted from these and the target is protected from injury. Temporary hit points are not real hit points and are lost first, with real hit point damage only taken if there is leftover damage.
Temporary hit points (PHB p.198)
Temporary hit points aren’t actual hit points; they are a buffer against damage, a pool of hit points that protect you from injury.
When you have temporary hit points and take damage, the temporary hit points are lost first, and any leftover damage carries over to your normal hit points.
So your scenario:
So say we have Max HP 20, 20 Hit Points, and 20 Temporary Hit Points, and the Vampire uses Bite dealing 5 Piercing Damage (THP = 15 now) and 10 Necrotic Damage (THP = 5 now).
This leads to the following outcome:
- The vampire bites for 5 piercing and 10 necrotic, all absorbed by the temporary hit points, leaving 5 temporary hit points and the character uninjured.
- No necrotic damage was done to the character as it was all absorbed by the temporary hit points (no damage was done at all, the character was protected from injury) so their maximum hit points are unaffected.
- The victim's hit points remain at 20
- The victim's maximum hit points remains at 20
However what about other scenarios? Let's say the attack happened again next round with exactly the same damage, except now the character only has 5 temporary hit points:
- The vampire bites for 5 piercing and 10 necrotic damage, the victim has 5 temp hit points
- The DM rules that the piercing damage is done "first" with the necrotic done second as the blood/life is sucked from the victim.
- The victim's temp hit points absorb the 5 points of piercing damage completely leaving no temporary hit points.
- The victim takes 10 hit points of necrotic damage
- The victim has 10 hit points remaining (20 -10 necrotic)
- The victim's maximum hit points is reduced by 10 (the necrotic damage done) to 10
A different DM ruling might be that the temp hit points are "shared out" in the ratio of the different damage types done as it all happens at the same time. This takes more maths so is slower and cumbersome, but in some circumstances makes much more sense (a Flame Strike where the fire and radiant damage is done at the same time and there is no story telling "order" or fluff saying otherwise), though in my opinion for the vampire's bite scenario the ruling above makes more sense, both thematically and in terms of smoother gameplay.
However if the DM went with the "shared out" ruling:
- The vampire bites for 5 piercing and 10 necrotic.
- 5/15 or 1/3 of the temp hit points absorb piercing damage and 10/15 or 2/3 absorb necrotic damage
- The DM therefore rules that the victim takes 3 piercing and 7 necrotic damage
- The victim has 10 hit points remaining (20 -3 piercing -7 necrotic)
- The victim's maximum hit points is reduced by 7 (the necrotic damage done) to 13
On a final note, this character, with 20 hit points and 20 maximum hit points and 20 temporary hit points stands no chance against a vampire and I feel very sorry for them.