Heat the oven to 350°F (175°C). Lightly grease a deep-dish pie plate and set it on a baking sheet.
Cook the spaghetti according to the package directions until just tender. Drain, return it to the pot, and stir in the butter.
Whisk the eggs with the Parmesan. Let the noodles cool briefly, then toss them with the egg mixture. Press the spaghetti evenly into the pie plate, including the sides, to form a crust.
Stir the ricotta, parsley, and basil together. Spread the cheese mixture over the spaghetti crust.
Brown the ground beef and onion in a skillet over medium heat until the beef is cooked through and the onion is soft. Drain excess fat.
Add the drained tomatoes and pasta sauce to the skillet. Simmer for several minutes, until the sauce thickens slightly.
Spread the meat sauce over the ricotta layer and scatter the mozzarella over the top.
Bake for 25 to 30 minutes, until the mozzarella is melted and bubbling and the center is hot. Rest for 10 to 15 minutes before slicing.
Notes
Press the spaghetti firmly and let the pie rest before slicing for the cleanest wedges.