Add the oil to a large sauté pan over medium heat. Add the onions and salt and cook, stirring occasionally, until the onions are soft and deep golden brown, about 30 to 40 minutes. (If the sides of the onions begin cooking too fast, lower the heat to medium-low, add a little more oil, and stir. Your goal is to have the onion slices cook as uniformly as possible.) Remove the onions from the pan and place them in a bowl.
In the same sauté pan over low heat, add the spinach and cook, stirring frequently, until wilted, about 2 minutes. Remove from heat and transfer the spinach to another bowl, then carefully wipe the pan dry with a paper towel.
Return the pan to the stove and increase the heat to medium-low. Lay one tortilla flat in the pan. Evenly sprinkle ½ cup of cheese over the top. To the bottom half of the tortilla, add ¼ of the caramelized onions, followed by ¼ of the wilted spinach. Heat until the cheese melts and the tortilla is browned and crispy.
Add the avocado slices (about ½ of an avocado per quesadilla), and immediately fold the tortilla in half, onto itself, and flip it over. Continue cooking for about 30 seconds or until warmed through.
Using a spatula, transfer the quesadilla to a cutting board. Cut into fourths. Repeat this process with the remaining ingredients and serve with your favorite salsa or cilantro pesto.