Peel the onions and cut them into 1-inch thick slabs. Aim for 2-3 slabs per onion. You should get at least 8 onion slabs.
In a small bowl, mix the olive oil, salt, black pepper, and red pepper flakes if using. Brush both sides of each onion slab with the oil mixture and place them on a parchment-lined baking sheet.
In a medium bowl, combine the mozzarella, cheddar, cream cheese, Parmesan, and minced garlic. Add the thyme and parsley and mix until well blended.
Take a generous tablespoon of the cheese mixture and spread it on top of each onion slab. Press down lightly to help the cheese adhere.
Place the baking sheet in the preheated oven and bake for 25-30 minutes, or until the onions are tender and the cheese is bubbly and golden brown.
Once done, remove from the oven and let them cool slightly. Garnish with fresh basil leaves if desired. Serve warm.
Notes
Optional toppings and garnishes can be adjusted to taste.