Prep. Heat oven to 375F. Lightly grease a 9x13 inch baking dish.
Cook pasta. Bring a large pot of salted water to a boil. Cook ziti 2 minutes shy of al dente. Drain.
Make the sauce. Heat olive oil in a large skillet over medium heat. Add onion and cook 4 to 5 minutes until softened. Add garlic and cook 30 seconds.If using sausage/beef: add it and cook until browned, breaking it up. Drain excess fat if needed.Stir in Italian seasoning, red pepper flakes, marinara, and water/broth. Simmer 5 minutes. Taste and season with salt and pepper. Mix cheese layer. In a bowl, stir together ricotta, egg, Parmesan, 1 cup mozzarella, and herbs if using.
Assemble. Add half of the pasta to the baking dish. Spoon on half of the sauce. Dollop half of the ricotta mixture and gently spread. Repeat with remaining pasta, sauce, and ricotta mixture. Top with remaining 1 cup mozzarella and a little extra Parmesan.
Bake. Cover with foil and bake 20 minutes. Remove foil and bake 10 to 15 minutes more until bubbly and golden.
Rest and serve. Let rest 10 minutes, then scoop and serve.