Any food that is left out for more than two hours, whether pepperoni or cooked bacon, has a higher risk of foodborne illness. Unopened pepperoni can stay at room temperature for up to one month. It is best that unopened pepperoni be stored in the refrigerator to prolong its flavor and freshness. Bacillus cereus usually exists in our environment and can survive the heat of the normal pizza preparation process because it is heat resistant.
Then, once at room temperature or in the “danger zone” of 40°F to 140°F, Bacillus Cereus multiplies rapidly. You should keep the pizza warm or cool it down quickly to prevent Bacillus cereus food poisoning. You can't leave it out overnight. Bacillus cereus food poisoning will cause you to suffer from vomiting, abdominal pain, or diarrhea.
Make sure you get enough rest and drink plenty of fluids. If symptoms persist for more than 24 hours, see a doctor. You may have decided to start making your own pizzas and, when you spread the dough, you realize that you left the pepperoni on the counter for hours.