Preheat oven to 350°F. Spray a 9-inch cake pan with cooking spray.
In a large skillet or frying pan, brown the hamburger with the onions until all the pink is gone. Breaking up the meat with a wooden spatula as your cook. Drain the meat. Stir in the pasta sauce and set aside.
Cook the spaghetti noodles according to the package instructions. Drain and place into a large bowl. Fold in the beaten egg, melted butter, and half of the shredded parmesan cheese with the noodles.
Lightly butter the inside of a glass pie plate or small casserole dish. Gently place the noodle mixture in the bottom of the prepared pie plate. With the back of a spoon, lightly press the noodles into the sides of the plate to form a crust shape; leaving a slight cavity for the filling layers.
In a small bowl, mix together the cottage cheese, the last half of the parmesan cheese, dried oregano and basil. Scoop the cottage cheese mixture into the top of the noodle crust and spread evenly.
Next add a layer of the meat and pasta sauce mixture.
Cover lightly with foil and bake in a preheated oven for 25 minutes. Remove the foil and sprinkle with shredded mozzarella cheese. Bake uncovered for an additional 5 minutes or until the cheese is fully melted.
Carefully remove the spaghetti pie from the oven and let it cool slightly before serving.