Boil the pasta: Cook the spaghetti in salted boiling water until just shy of al dente, about 8 minutes. Drain well and set aside; undercooking slightly keeps it from turning mushy in the oven.
Preheat the oven: Set the oven to 375°F while you prepare the rest of the dish so it's ready to go the moment the layers are assembled.
Brown the beef: Cook the ground beef and minced garlic in a skillet over medium heat for about 6 minutes, breaking it into crumbles, until no pink remains. Drain any excess fat.
Build the sauce: Stir the marinara sauce and Italian seasoning into the browned beef. Simmer for 2 minutes to let the flavors combine.
Blend the cottage cheese: Blend the cottage cheese in a food processor or blender for 15 to 20 seconds until completely smooth with no visible curds.
Mix the cheese layer: Whisk the eggs and Parmesan cheese into the blended cottage cheese along with the salt and pepper until fully combined.
Toss half the pasta: In a greased 9x13-inch baking dish, toss half the cooked spaghetti with half the meat sauce and spread it in an even layer.
Spread the cheese mixture: Pour the cottage cheese mixture evenly over the pasta layer, smoothing it to the edges of the dish with a spatula.
Add the remaining layers: Toss the rest of the spaghetti with the remaining meat sauce and spread it over the cottage cheese layer.
Bake covered: Cover the dish with foil and bake at 375°F for 25 minutes, until heated through and bubbling around the edges.
Add cheese and finish baking: Remove the foil, sprinkle the mozzarella over the top, and bake uncovered for 10 more minutes until the cheese turns golden and bubbly.
Rest before slicing: Let the bake rest for 5 minutes out of the oven so the layers set and each slice holds its shape when served.