Preheat the oven to 375℉. Spray a 9x9-inch pan or 11x7-inch casserole dish with nonstick spray.
Bring a pot of salted water to a boil. Cook the pasta in the water, according to package instructions. Drain.
Cook the beef in a nonstick skillet until browned. Spoon out the fat and discard and remove the meat from the skillet.
In a large skillet, heat the oil over medium heat. Add the onion and saute until softened (about 5 minutes). Stir in the garlic for 1 minute. Stir in the cooked beef and the marinara sauce. and remove the pan from heat.
In a medium bowl, use a wooden spoon to combine the ricotta, cream cheese and sour cream. Season with salt and pepper.
Add some of the meat sauce to the bottom of the prepared baking dish (just enough to cover the bottom of the dish). Add half of the cooked spaghetti to the top of the sauce. Then spread on half of the meat sauce, half of the ricotta mixture and half of the mozzarella cheese. Layer again with spaghetti, meat sauce, ricotta and mozzarella. Sprinkle the Parmesan cheese on top.
Bake, uncovered, for 25 minutes (then check to make sure the cheese isn't browning too quickly-- if so, lightly cover with foil). Bake another 15 to 20 minutes until hot and bubbly.