Preheat oven to 350°F (175°C). Grease a 9×13-inch baking dish.
Boil spaghetti in salted water for 1 to 2 minutes less than package directions (al dente). Drain and toss with butter. Set aside.
Heat olive oil in a large skillet over medium-high heat. Add onion, cook 3 minutes. Add garlic, cook 30 seconds. Add ground beef and sausage, break up with a spoon, and cook 7 to 9 minutes until no pink remains. Drain excess fat.
Add Italian seasoning, salt, pepper, and marinara to the meat. Stir and simmer over medium-low for 5 minutes. Set aside.
In a large bowl, combine cream cheese, ricotta, sour cream, egg, and salt. Mix with a hand mixer or stir until completely smooth.
Spread half the buttered spaghetti in an even layer in the baking dish.
Spread the cheese mixture evenly over the pasta layer.
Add the remaining spaghetti as an even top layer over the cheese. Press gently.
Spoon the meat sauce evenly over the top pasta layer. Sprinkle mozzarella and Parmesan over the sauce.
Cover with foil and bake 30 minutes. Remove foil and bake 15 minutes more until cheese is golden and bubbling. Broil 2 to 3 minutes for a browned top if desired.
Rest 10 minutes before serving. Garnish with fresh herbs if using.