Peel away the outer layers of the garlic bulb skin, leaving the skins of the individual cloves intact. Using a knife, cut off ¼-inch off the top of cloves, exposing the individual cloves of garlic.
Drizzle ½ teaspoon of olive oil on a small piece of aluminum foil and place the garlic head, cut side down, into the oil. Bake in preheated oven for 30-35 minutes, or until the cloves feel soft when pressed.
Remove from the oven, the foil, and set aside to cool.
Reset oven temperature to 350F and oil a 9? pie pan, set aside.
Meanwhile, prepare al dente spaghetti according to package directions.
While the pasta is cooking, prepare your sauteed onions – heat 1 teaspoon olive oil in a cast iron pan on medium heat. Add onions. Allow to cook for 10 minutes, until golden.
To assemble the pasta crust, add cooked spaghetti, cheese, beaten egg, smashed roasted garlic cloves, and sea salt in a large bowl.
Press mixture into prepared pie pan.
Top crust with basil sauce, sauteed onions, basil leaves, sun dried tomatoes and cheese.
Cover top and cook in the oven for 30 minutes, until egg has set. Remove foil and cook for another 5 minutes, until cheese is slightly golden.
Remove from the oven, allow to cool for 5 minutes, then carefully remove from the pan, or serve as is.
Note: if you’re not sensitive to dairy, a mixture of grated parmesan, mozzarella, and provolone would be nice. If you are, choose lactose-free cheese made from soy like this one, or dairy-free cheese like daiya.