he didn't really have his memories, he said as much to patty about knowing there was something wrong but not knowing what, but he may have recalled at least a little more than the others when the call triggered him. it's mentioned at least once that he was one of the few to to express doubts about It's death, and maybe he even recognized it was pregnant. they also talked a lot about how the supernatural offended his sense of order. he was the closest to coming unhinged at any given point, because he had a stricter belief in natural order and having things be explainable. it's possible that he didn't even have time to remember very much before his mind said screw this and he did what he did. he would have just had to remember the horror and the unnaturalness of it all. his mind struggled to live in a world where something like It existed and to reconcile his understanding of the world after witnessing It's powers
they even mention at one point how an adult seeing what they did would have ended up straight in the nut house, but as kids, they absorbed it into their world view and moved on. stanley was already practically a mini adult the first time around, and his mind would have only wound tighter with age