Preheat the oven to 350°F (175°C). Grease a 9x13-inch baking dish.
Cook the spaghetti according to package instructions until al dente. Drain and set aside.
In a large skillet over medium heat, cook the ground beef or sausage until browned. Drain excess fat.
Stir in the marinara sauce, garlic powder, onion powder, Italian seasoning, salt, and pepper. Simmer for about 5 minutes.
In a large bowl, combine the softened cream cheese, sour cream, half of the mozzarella cheese, and half of the Parmesan cheese. Mix until smooth.
Add the cooked spaghetti to the cream cheese mixture and stir until well combined.
Spread half of the spaghetti mixture in the prepared baking dish. Layer half of the meat sauce on top. Repeat the layers with the remaining spaghetti and meat sauce.
Sprinkle the remaining mozzarella and Parmesan cheese on top.
Bake in the preheated oven for 25-30 minutes, or until the cheese is bubbly and golden.
Let the casserole cool for 5-10 minutes before serving. Garnish with fresh parsley.