Combine balsamic vinegar and sugar in a small saucepan on medium-high heat. Let the mixture come to a simmer. Stir regularly so the mixture doesn't burn. Once the mixture has shrunk to about half its size and it sticks to the spoon when you stir, take the glaze off the stove and set aside to cool.
Preheat oven to 500 degrees. Mix together 2 tbsp of olive oil, garlic powder, oregano, and salt. Set aside.
Heat two tbsp of olive oil in a pan to medium heat. Add onions. When onions are soft, add the sugar and stir until involved. Continue to cook until the onions turn a caramel color. Set aside.
Heat one tbsp of olive oil in the pan to a medium heat. Add mushrooms and cook until they have a golden sear. Set aside.
Roll out pizza dough on parchment paper. Spread the pesto on the dough, leaving 1/2 inch to spare around for the crust.
Using a pastry brush, brush the olive oil mixture on the crust.
Sprinkle 1/4 cup of mozzarella cheese on the pizza. Add onions, mushrooms, spinach, sun-dried tomatoes, the rest of the mozzarella cheese, and the parmesan cheese.
Bake for 10 minutes until cheese is melted and the crust is golden. Brush the crust with the rest of the olive oil mixture.
Let cool for a few minutes before drizzling on the balsamic glaze and sprinkling on the basil.