Fill a large pot with salted water and bring it to a rolling boil. Add spaghetti and cook until al dente, about 11-12 minutes. Drain, toss with a little olive oil to prevent it from sticking, and set aside.
Meanwhile, in a large pan over medium heat, combine the ground beef and ½ cup of the chopped onion and cook, breaking up the meat until browned. Drain any excess grease from the pan and add the spaghetti sauce, Italian seasoning, and salt. Simmer for 15-20 minutes.
In a medium bowl, combine the cottage cheese, sour cream, and pepper. Stir until combined, then set aside.
Whisk together the two eggs, melted butter, and Parmesan cheese in a large bowl and then add the cooked spaghetti. Toss to coat.
To assemble the baked spaghetti casserole, in a 9x13-inch baking dish, spread ½ of the cooked spaghetti noodles. Dollop spoonfuls of the cottage cheese and sour cream mixture over top and spread it into an even layer. Pour half of the spaghetti sauce and meat mixture over the top of the noodles and cottage cheese and spread it to the edges, then sprinkle half of the shredded mozzarella cheese over the whole thing. Repeat for a second layer with the remaining ingredients.
Cover with foil and bake in a preheated oven at 350 degrees for 30-40 minutes, until hot in the center and the cheese is melted and bubbly. Remove foil and allow the casserole to rest for 15 minutes before serving.
If making this casserole as a freezer meal, prepare to the point of baking it in the oven, then wrap tightly in foil and freeze. Defrost completely in the refrigerator when ready to cook, then bake in the oven for 40-50 minutes, until hot through and the cheese is melted and bubbly.