Preheat and prep: Heat your oven to 350°F (175°C).
Grease a 9x13-inch baking dish with nonstick spray or butter.
Boil the pasta: Cook spaghetti in salted water until just shy of al dente. Drain and toss with a drizzle of olive oil to prevent sticking.
Brown the meat: In a large skillet, warm olive oil over medium heat. Add onion and cook 3–4 minutes.
Stir in garlic for 30 seconds. Add ground beef or sausage, break it up, and cook until browned. Drain excess fat.
Sauce it up: Stir in marinara, tomato paste (if using), Italian seasoning, red pepper flakes, and a pinch of salt and pepper.
Simmer 5–7 minutes to thicken slightly. Taste and adjust seasoning.
Make the creamy layer: In a bowl, mix cream cheese, sour cream, and cottage cheese or ricotta until smooth. Season with a pinch of salt and pepper.
Fold in half the chopped herbs.
Combine pasta and sauce: Toss the cooked spaghetti with about two-thirds of the meat sauce so it’s fully coated but not soupy.
Layer the casserole: Spread half the sauced spaghetti in the baking dish. Dollop and spread the creamy cheese mixture evenly over it. Add the remaining spaghetti.
Pour the last third of the meat sauce over the top.
Add the cheese: Sprinkle mozzarella and Parmesan evenly over everything.
Bake: Cover loosely with foil and bake 20 minutes. Remove foil and bake another 10–15 minutes, until the cheese is melted, bubbly, and lightly golden.
Rest and garnish: Let it rest 10 minutes so it sets. Sprinkle with remaining herbs, slice, and serve.