Boil the spaghetti: Cook spaghetti in a large pot of salted boiling water until just tender, about 9 minutes. Drain well and toss with melted butter so the noodles don't stick together.
Brown the beef: In a large skillet over medium heat, cook ground beef with diced onion and garlic until the beef is no longer pink, about 7 minutes. Drain excess fat.
Simmer the sauce: Stir marinara sauce, salt and pepper into the browned beef. Simmer uncovered for 5 minutes, stirring occasionally, until slightly thickened.
Make the cheese layer: In a mixing bowl, beat cream cheese, sour cream and cottage cheese together until smooth and well combined with no lumps remaining.
Preheat the oven: Preheat your oven to 350°F and lightly grease a 9x13 inch baking dish with butter or cooking spray.
Layer the first noodles: Spread half of the buttered spaghetti evenly across the bottom of the prepared baking dish.
Add the cheese filling: Spread the cream cheese mixture evenly over the first layer of noodles, covering it completely in a thin layer.
Top with remaining noodles: Layer the rest of the buttered spaghetti over the cheese mixture, pressing down gently so the layers stay even.
Pour on the meat sauce: Spoon the beef and marinara sauce evenly over the top layer of noodles, spreading it to the edges of the dish.
Add the mozzarella: Scatter shredded mozzarella cheese evenly across the top so it covers the sauce completely.
Bake until golden: Bake uncovered for 25 to 30 minutes, until the cheese is melted and the edges turn golden and bubbling.
Rest before slicing: Let the casserole sit for 10 minutes before cutting so the layers set and slices hold their shape.