Yes, a vampire's bite can sometimes effectively deal extra damage due to temporary hit points
Damage to temporary HP still counts as damage
Per this Jeremy Crawford Tweet:
When temporary hit points absorb damage for you, you're still taking damage, just not to your real hit points.
So, when the bite ability says "hit point maximum is reduced by an amount equal to the necrotic damage taken" that means that max HP will be reduced by the amount of damage done regardless of temp HP.
Your example
In your example, your maximum HP is 20. Your current HP will also start at 20 since you have taken no damage before this. You also start with 20 temporary HP from some spell or effect.
Starting condition
Max HP: 20
Curr. HP: 20
Temp. HP: 20
So, you take 5 piercing damage and 10 necrotic damage.
Max HP: 20
Curr. HP: 20
Temp. HP: 20 - 5 (piercing) - 10 (necrotic) = 5
Then, because of the vampire bite, your maximum HP is reduced by 10.
Max HP: 10
Curr. HP: 10
Temp. HP: 5
And because your maximum HP drops below your current HP, your current HP immediately drops with it. This is because current HP can never exceed max HP:
A creature's current hit points (usually just called hit points) can be any number from the creature's hit point maximum down to 0. This number changes frequently as a creature takes damage or receives healing.
In this case then, a **vampire's bite, will do additional damage to your HP because of the HP drain and the fact that you had temporary HP.
Specifically it did:
5 (piercing)
10 (necrotic)
10 (HP drain)
= 25 damage
A creature without temp HP would have taken 15 damage. So, yes a creature with temp HP in this case actually effectively takes more damage than a creature without.
Temporary HP is not affected by HP drain since it is independent of max HP.
Official ruling
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
Note that I have been referring to the HP maximum reduction as "damage". I do not mean damage in the technical sense (eg effects that depend on "you take damage") but in the common sense that you lost HP thus it is effectively damage.
The Vampire would not heal
The way I read this (if I take your quoted text) is to break it down into individual sentences:
Hit: 7 (1d6 + 4) piercing damage plus 10 (3d6) necrotic damage.
This is clear; the bite, if it hits, does this much damage, and of course, the necrotic damage would be halved due to the resistance to necrotic damage that the Necromancer has.
The next sentence is:
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.
Taken in isolation, since the Necromancer cannot have their maximum hit points decreased, the amount that it has been decreased is effectively 0, regardless of the damage taken as per the previous sentence. Therefore, the vampire would heal by 0, since the vampire regains hit points equal to that amount, which is 0.
Another way to interpret this is that since you cannot have your maximum hit point reduced, this whole sentence cannot apply, so rather than the vampire regaining 0 HP, the vampire simply doesn't get to regain anything since you can't have your maximum hit point reduced. Either way, they resolve the same way; the vampire gets nothing.
This also matches the flavour of the Necromancer's class feature, Inured to Death, which reads "You have spent so much time dealing with undead and the forces that animate them that you have become inured to some of their worst effects" (PHB, pg. 119); since they would have gained a certain resilience to their life force, they cannot have it drained out of them as a normal mortal could. Of course, they can still take damage...
Best Answer
You also gain 10 temporary hit points.
If the target has less than 10 hit points, then you gain more temporary hit points than the target has hit points.
The damage dealt and the temporary hit points gained are distinct effects of the sword of life stealing. If they were meant to interact, the sword would say so. As you have observed, the item description just says:
This means that if you roll a 20 on the attack roll, you gain 10 temporary hit points. It doesn't matter how many hit points the target has left, or even if it immune to necrotic damage. As written, you even gain the temporary hit points if the target is a construct or an undead.
If it was intended to be limited by the necrotic damage dealt, it would say something like:
This language is used in an Unearthed Arcana, for the Blood Fury Tattoo:
For an officially published example that connects the damage dealt to the hit points gained, we have the Fane-Eater:
The precedent exists for limiting the hit points gained by the damage dealt, but it is not the case with the sword of life stealing. You gain 10 temporary hitpoints with the sword of life stealing.