Well, the Pomeg Berry lowers the Pokemon's HP EV's, not the base stat. Since Shedinja can inherit the EV's from Nincada, the Pomeg Berry will decrease those HP EV's (if any), but the base HP stat will still always be 1. Therefore, to answer your question, a Pomeg Berry can legitimately be used on Shedinja for happiness, and the game will not glitch out.
Hope I helped! :)