Preheat the oven to 375°F (190°C). Lightly grease a 9×13-inch baking dish.
Bring a large pot of salted water to a boil. Cook the ziti until slightly under al dente, about 2 minutes less than the package directions. Drain and set aside.
Heat olive oil in a large skillet over medium heat. Add the onion and cook for 3–4 minutes until softened.
Add the garlic and ground sausage. Cook for 6–8 minutes, breaking the meat apart, until browned and fully cooked.
Stir in crushed tomatoes, tomato paste, Italian seasoning, red pepper flakes, salt, and black pepper. Simmer for 10–15 minutes until the sauce thickens slightly.
In a bowl, combine ricotta cheese, egg, Parmesan cheese, and fresh basil.
Add the cooked ziti to the sauce and toss until evenly coated.
Spread half of the pasta mixture into the baking dish. Add spoonfuls of the ricotta mixture and sprinkle with mozzarella. Add the remaining pasta and top with the remaining cheese.
Bake uncovered for 25–30 minutes, until bubbling and the cheese is melted.
Create the Halloween decorations while the pasta bakes. Cut mozzarella into small ghost shapes. Add olive slices for eyes to create spooky faces.
For a spiderweb effect, place shredded mozzarella in thin lines over the top and gently heat until melted into a web-like pattern.
Remove from the oven and let rest for 5–10 minutes before serving.
Serve warm with extra basil and Halloween decorations.