Preheat your oven to 350°F (175°C). Cook the spaghetti according to the package instructions until al dente, drain, and set aside.
Cook the Meat:
In a large skillet over medium heat, cook the ground beef, onion, and garlic until the meat is no longer pink and the onions are translucent. Drain any excess fat.
Stir in the marinara sauce, Italian seasoning, salt, and pepper. Simmer for about 5 minutes, then remove from heat.
Prepare the Cheese Mixture:
In a medium bowl, combine the softened cream cheese, sour cream, and cottage cheese. Mix until smooth. Stir in 1 cup of mozzarella cheese and ½ cup of Parmesan cheese.
Assemble the Casserole:
Spread a thin layer of the meat sauce in the bottom of a 9×13 inch baking dish.
Layer half of the cooked spaghetti over the sauce.
Spread the cheese mixture evenly over the spaghetti.
Add the remaining spaghetti on top of the cheese layer, then cover with the remaining meat sauce. Sprinkle the remaining mozzarella and Parmesan cheese over the top.