Preheat the oven to 400 degrees Fahrenheit. Season the chicken breasts with a pinch of salt and pepper.
Heat a large oven safe skillet over medium-high heat and add the butter. When the butter melts and starts bubbling, add the chicken breasts. Sear chicken undisturbed for about 5 minutes on each side or until deeply golden brown. Remove the chicken breasts and set aside, covered.(Don't worry about the chicken being fully cooked. We'll finish cooking them in a later step.)
Reduce the heat to medium and add the olive oil. When the oil is hot, add the onions. Cook the onions, stirring occasionally, until tender, about 5 minutes. Reduce the heat to low and continue cooking the onions on low heat, stirring occasionally, until golden brown and caramelized, about 45 minutes.
Increase the heat to medium and stir in the garlic, basil, oregano, parsley, and wine. Saute, cooking out the wine, for about 5 minutes. Sprinkle the onions with flour and stir to combine. Cook for another 2-3 minutes, then stir in the broth. Simmer for 5-7 minutes, until slightly thickened and reduced.
Return the chicken to the pan and arrange in the middle of the onion mixture. Transfer the skillet to the oven and bake for about 15-20 minutes, depending on the thickness of your chicken, until it is cooked through.
Top the chicken with the shredded gruyere cheese. Return to the oven and bake or broil 2-3 minutes or until the cheese is melted and golden brown. Let rest 5 minutes before serving with fresh parsley if desired!