Does he still get the 2 ev points in hp
It will still get the EVs. If a Pokemon gains EXP in any way, it will always gain the EVs regardless if the Pokemon switches out. This opens an EV training tactic of using an EXP Share to EV Train 2 Pokes at once.