Preheat your oven to 375F and move the rack to the top third of the oven.
In a medium bowl, add the cream cheese, ricotta cheese, parmesan cheese, garlic powder, dried oregano, salt, and pepper. Stir until smooth.
Boil a large pot of salted water and cook your spaghetti for two minutes less than package directions suggest.
In a skillet over medium-high heat, add your Italian sausage along with chopped onion. Cook for about ten minutes until browned.
Stir in minced garlic and red pepper flakes if using. Cook for another minute.
Add your sausage mixture into the pot with cooked spaghetti. Pour in both jars of marinara sauce and toss until well coated.
Spread half of the pasta/sauce mixture into a greased 9x13 baking dish. Then spread your cheese layer over it.
Top off with the remaining pasta/sauce mixture and sprinkle mozzarella cheese over everything.
Cover your casserole dish with foil and bake for 30 minutes. Remove the foil and broil for a few minutes until cheese is bubbly and browned.
Let your Million Dollar Spaghetti sit for about five to ten minutes before slicing into portions.