Preheat the oven to 375°F (190°C).
Cook the ziti pasta according to package instructions until al dente.
In a skillet, cook the Italian sausage over medium heat until browned and fully cooked, about 5-7 minutes.
Add the marinara sauce to the cooked sausage, stirring to combine. Simmer for 5 minutes.
In a bowl, mix ricotta cheese, egg, Italian seasoning, salt, and pepper until smooth.
In a large bowl, combine cooked ziti with the sausage sauce, reserving a small amount for topping.
Spread half of the ziti mixture in a greased baking dish, followed by the ricotta mixture, then the remaining ziti.
Top with remaining sauce and sprinkle with mozzarella and Parmesan cheeses.
Cover the dish with foil and bake for 25 minutes. Remove foil and bake for another 15 minutes, or until the cheese is bubbly.
Let it sit for 10 minutes before serving, garnishing with fresh basil if desired.