Preheat the oven to 350 degrees.
In a large skillet add the beef, onions, garlic, salt and pepper into the pan and cook on high.
Once browned, turn off the heat, drain the liquid left in the pan and mix in one cup of the marinara sauce.
Add the cooked spaghetti to the remaining 5 cups of the marinara sauce and toss to combine.
Mix the cream cheese and 2 cups of mozzarella cheese in a bowl.
Add half the pasta/sauce to the bottom of a 9x13 pan.
Add the cream cheese mixture and top with the remaining pasta/sauce mixture.
Add the meat sauce mixture on top of the pasta and top with remaining cup of mozzarella cheese.
Cover and bake for 30 minutes.
Uncover and bake for an additional 10 minutes until cheese is melted and bubbly