dnd 5e – Does the second benefit of the Piercer feat allow rerolls of non-piercing damage?

As written, yes it does. The “that deals piercing damage” qualifier applies to the “attack,” not to the individual “one of the attack’s damage dice” that you choose to reroll, so you can choose a die that represents non-piercing damage.

(Extra damage dice due to a critical hit would generally be the same type of damage as the initial hit, so those should be piercing damage if you crit with a piercing weapon. Booming blade is a better example, since that adds thunder damage to the hit itself and so is non-piercing damage that is part of “the attack’s damage dice.”)

Do note, however, that many DMs may decide they don’t like that rule, and decide to houserule the situation at their own table so apply the ability only to those dice that represent piercing damage. If you plan to rely on this ability, it would be wise to discuss it ahead of time. To any DMs reading this, if you dislike it and want to change it, you should also make that clear ahead of time—if you’re in the middle of combat and someone wants to reroll a thunder damage die from booming blade using this feat, that is a very bad time to introduce a houserule preventing them. Players need that information before they do things like choose the Piercer feat or the booming blade spell.