We just went through this with my son. He's just now started pooping in the toilet again. We moved and found out I was pregnant about the same time, so I'm sure that's got something to do with it. Two big changes at once (new baby, Kindergarten) could be what's getting to him. It could also be something else that's really small and happened right in line with school and the new baby. It's possible that something little was just the tipping point. It could also be a lot of little things that happened at the same time.
I'd tried asking my son all the standard questions, "Did you mean to poop in your underwear?" "Did you know you had to poop before it happened?" that sort of thing. He always gave me the answer he thought I wanted to hear. It was very frustrating and not terribly helpful. I decided to just deal with it. Not long after this I had a friend tell me her step-son used to do the same thing whenever he would come to visit. He was perfectly healthy and normal, but that's just part of how he handled the situation, through regression.
With my son the only thing that worked was patience and giving him control of the situation. When he pooped in his pants we took him to the bathroom, made him empty the poop into the toilet, rinse out the underwear in the sink, and clean his bum with wipes. We didn't make it anything shameful or a big deal, so he didn't make a big deal of it. The only times it turned into an issue was right after he had some pretty serious diarhea (it was going around) so we put him in the shower to clean up after he had an accident. After that he started fussing and complaining because he thought accidents were an excuse for bath time, but we worked through that. Eventually he just decided it was quicker and easier to poop in the toilet, and it meant he didn't have to change his clothes or rinse his underwear. It just became convenient to poop in the toilet, so he just did. He hasn't gone back since, though I fear he might after the baby's born.
It can't hurt to have him checked out by a doctor if it seems like anything that may be bothering him. Obviously if he looks at all uncomfortable when he poops, that right there is a clue. However, given the new baby and Kindergarten situation, I'd give it a little while and see if he sorts it out on his own. And I would try making him clean up after himself, not as a shame thing, but just as a "You're a big boy now and this is how we handle it" kind of thing. The way I explained it to my son, he's big enough to handle it himself like a big boy. Big kids would have to clean up after their own accidents. Adults have to clean up after their own accidents. Therefore, he had to clean up after his accidents. It's just part of growing up.