In a large bowl, whisk together the eggs and Parmesan cheese until well blended. Season with salt and pepper to taste. Add the spaghetti and toss to combine everything. Set aside.
Preheat the oven to 375 degrees F. In a large, oven-proof skillet (such as cast iron) over medium heat, cook the bacon until crispy and set aside on paper towels to drain. You can save the fat to cook the rest of the ingredients or pour off the fat and start over with 1 tablespoon of olive oil.
Add the onion to the skillet and saute over medium heat for about 5 minutes, stirring often, until softened. Add the spinach and cook until just wilted, about 2 minutes. Add the garlic and saute until fragrant, about a minute.
Pour the egg/spaghetti mixture into the skillet and sprinkle evenly with the bacon pieces. Scatter the mozzarella, olives, tomatoes and basil on top. Lower the heat and let cook for 3 minutes to set the eggs on the bottom. Transfer the pan into the oven and bake for 15-20 minutes, until a knife inserted in the center comes out clean. Remove from the oven and allow to cool slightly. Cut into wedges and serve.