Preheat the oven to 350°F and lightly grease a 9x13-inch baking dish. Cook the spaghetti according to the package directions until just al dente. Drain and set aside.In a large skillet over medium heat, cook the ground beef and diced onion until the beef is browned and the onion is tender. Drain any excess grease. Add the garlic and cook for about 30 seconds. Stir in the marinara sauce, Italian seasoning, salt, and pepper. Let the sauce simmer for 5 minutes.
In a medium bowl, mix the softened cream cheese, cottage cheese, sour cream, 1/2 cup mozzarella, and Parmesan until well combined.
Place the butter slices across the bottom of the prepared baking dish.
Add half of the cooked spaghetti, then spread the creamy cheese mixture evenly over the noodles.
Add the remaining spaghetti on top of the cheese layer. Pour the meat sauce evenly over the spaghetti and sprinkle the remaining 1 cup of mozzarella cheese over the top.
Bake uncovered for 30–35 minutes, or until the casserole is hot and bubbly and the cheese is melted.
Let the casserole rest for 5–10 minutes before slicing and serving. This gives the layers a little time to set and makes it easier to serve.