Preheat the oven to 350°F. Cook the spaghetti according to the package directions for al dente. Editor's Tip: Al dente means "to the tooth." The pasta should have a bit of bite, as it will continue to soften slightly as the casserole bakes.
While the pasta is cooking, cook the ground beef and onions in a large skillet over medium heat, breaking the meat into crumbles with a wooden spoon or spatula. Cook until the onion is tender and the beef is no longer pink, six to eight minutes. Drain the excess fat, then stir in the pasta sauce and seasoned salt.
In a large bowl, whisk the eggs, Parmesan cheese and butter. Drain the spaghetti and add it to the egg mixture; toss to coat. Editor's Tip: Coating the noodles in this egg mixture keeps them from clumping in the baking pan.
Using tongs, place half the noodle mixture in a greased 13x9-inch baking dish. Spread half the cottage cheese across the noodles, then add a layer of meat sauce and a sprinkling of mozzarella cheese. Repeat the layers once more, ending with a final layer of mozzarella. Editor's Tip: To make the cottage cheese smoother, whiz it in a food processor or blender before layering.
Place the baking dish on a rimmed baking sheet and cover the dish with aluminum foil. Bake for 40 minutes, then uncover and bake for 20 to 25 minutes longer until the pasta heats through and the cheese is melty and golden brown in spots.
Let the pasta stand for 15 minutes. If desired, sprinkle with fresh basil before serving. Editor's Tip: Don't dig in right away! Letting baked spaghetti (and any baked pasta dish) sit for 15 minutes or more allows it to firm up, making for more uniform slices vs. a gloopy, too-hot-to-eat mess.