Preheat the oven to 425 degrees . In a medium cast-iron skillet, heat the EVOO over medium heat. Add the onion and cook until softened, about 3 minutes. Add the mushrooms and garlic and cook until mushrooms have released their juices, about 5 minutes. Stir in the thyme and cayenne; season. Transfer to a plate.
Off the heat, sprinkle half of the cheese then half of the mushroom mixture into the skillet. Repeat with the remaining cheese and mushrooms.
Transfer the skillet to the oven. Bake until the cheese is bubbling, about 15 minutes.