L.R.
Maybe he's aware, if you've mentioned it, that he cannot go to school in pull-ups, and he's fighting going to school by regressing and being sure to stay in them. You could talk with him about how he feels about going to school. I would not do it in the context of "Are you pooping in your pants so you won't have to go to school?" because surely he'll deny that. I'd wait until he's calm and quiet and start talking up the idea of school and seeing how he reacts.
Letting him wear pull-ups is giving him the message that you're accepting that he isn't using the toilet. He will keep using them as long as he gets to wear them, so it's time for them to go, and please resist using them "just for overnight" or "just while we're at the store." That will send him mixed signals.
If there are no changes or upsets in his life (other than starting school), then I'd sit him down and calmly tell him, Here is a new set of underwear with your favorite character on them. Here are the pull-ups. And now we're walking to the trash can outside and the pull-ups are going into it. I know you can use the toilet again and I'm really confident in you.
Have him put them in the trash. If he resists, cries, etc. just stay calm and low-key and do it yourself. Then when he goes to the bathroom in his pants, don't yell or punish; immediately walk him to the bathroom and have him strip off in the tub; have HIM hold his soiled clothes -- any and all of them, underpants, pants, socks, etc. -- under the tub tap to rinse them well. Have HIM put them into a plastic bag (which you'll take for a real wash in the washer later). Have him wipe up the floor where he was when he peed etc., even if it doesn't look wet. Have him wash, wash, wash his hands even if he doesn't want to. In other words: No more pull-ups and any messes he makes, he cleans up. It will seem to take ages but you need to stay very calm and not criticize and harp on it as he does it, just stand with him and offer instructions as needed. Don't punish, just make him clean it all up every time -- not as punishment but with an attitude of "I'm sorry you have to do this instead of play right now, but whenever there's an accident from now on, you need to help clean it up." And do it every time, even if it takes ages because he's sulky or balky or wants to go play.
Eventually he will figure out that the time it takes to do all that every time he soils himself is time he could spend playing.