Either 17 rimfire cartridge works fine for edible squirrels with head shoots. If I wanted a tree squirrel only rifle I'd get the 17HM2 of the two. Ammo is about half the price of HMR and the report not as loud.
Most of the firearms for these two rimfires shoot pretty good right out of the box, some can be improved with drop in parts. Some obviously are better than others, so if for head shots only you might want to get one of those known to be more accurate than the others. Personally, at normal tree squirrel ranges I think the majority of them are close enough to minute of squirrel head right out of the box. That said, I dolled some of mine anyway with all the goodies.
It is thought by some folks that the 17HM2 is going away, probably because some MFG's stopped making rifles for them. I don't think so myself, or at least I doubt they'll stop making ammo for them as long as it keeps selling like it is. It really doesn't matter one way or the other to me - I planned way ahead. I have three 17HM2's, three 17 HMR's and a lifetime of ammo stockpiled for all of them.
17HMR: Bullberry carbine, Marlin 17VS, Contender pistol
17HM2: Ruger 77/22 switch barrel, CZ 452 Deluxe, Contender pistol
Just buy the firearm you want, find which ammo it likes and stock up on it.