Sneak attack damage (also critical hit damage) can go above the maximum, and you get the temporary HP from sneak attack damage (and critical hit damage).
Your touch deals 1d6 points of damage per two caster levels (maximum 10d6). You gain temporary hit points equal to the damage you deal.
The cap is referring to the damage increase from caster levels, meaning that it stops increasing in power at caster level 20. This is the base damage. Any damage boosting coming from a source other than caster level would not be affected, including sneak attack.
Most spells increase in power with caster level. They may increase in range, be harder to resist, deal more damage, etc. For damage dealing spells, this increase is primarily through either additional dice (like with Vampiric Touch) or additional "hits" like with Acid Arrow. Either way, the increase is capped at some point. In the case of Vampiric Touch, it's capped at 10d6. Acid Arrow is capped at 6 extra "hits" (rounds of damage).
So if sneak attacks (and by extension critical hits since they both add extra damage) were capped by the listed maximum, at high levels they would be at a significant disadvantage to spells that were capped in a different way. A level 20 casting Vampiric Touch would in no way benefit from a critical or sneak attack. However, Acid arrow would still be eligible to receive the full benefit of a critical or sneak attack.
Since the temporary hitpoints gained are based on the damage you deal, you would gain the full amount (within the normal limit of max HP +10), including the extra damage caused by sneak attack.