Preheat oven to 350F. Shape the pie crust into a 9-inch pie plate. Place in refrigerator while preparing other ingredients.
Heat olive oil in a skillet over medium heat. Add onions and sauté until softened, cook for about 3-5 minutes. Reduce heat to medium-low and continue cooking until onion is very tender and brown, or 10-15 minutes more.
Spread mozzarella cheese and tomatoes over the bottom of the pie crust. Sprinkle with shredded Parmesan cheese.
Whisk eggs and lemon juice in a large bowl until smooth. Season with salt and pepper. Stir in basil and caramelized onion.
Pour egg mixture over the cheese and tomatoes.
Bake in preheated oven until eggs are set and crust is flaky, 45 to 55 minutes.
Dairy may be substituted for the lemon juice. Just add some milk or cream to the eggs and whisk well.