In a large pot or Dutch oven over medium-high heat, cook the Italian sausage, breaking it up with a wooden spoon, until browned and cooked through, about 5-7 minutes.
Add the diced onion to the pot and cook until softened, about 3-4 minutes. Stir in the garlic and cook for another minute until fragrant.
Pour in the crushed tomatoes and broth, then add the pasta, Italian seasoning, oregano, and red pepper flakes if using. Season with salt and pepper.
Bring the mixture to a boil, then reduce heat to medium-low. Cover and simmer for 12-15 minutes, stirring occasionally, until the pasta is al dente and most of the liquid has been absorbed.
Stir in half of the pepperoni slices, then sprinkle the mozzarella cheese evenly over the top. Arrange the remaining pepperoni slices on top.
Cover the pot and let it sit for 3-4 minutes until the cheese melts completely. Sprinkle with Parmesan cheese and fresh basil before serving.