In a small mixing bowl, use a fork to mix together the gruyere, cheddar, pecorino or parmesan, salt and pepper, and caramelized onions. You can gently tease the onions apart with the fork to make sure everything is mixed well.
Spread the mustard onto the inside faces of the bread slices.
Spread the cheese and onion mixture evenly onto one slice of bread and top with the other slice.
In a small frying pan, melt the butter over medium heat.
Place the sandwich into the pan and let the bottom slice of bread soak up some of the melted butter. Then carefully flip the sandwich and swipe it around the pan to mop up the remaining melted butter.
From this point on, the name of the game is to regulate the heat so that the cheese mixture melts in the same timeframe that the bread becomes golden-brown. You'll have to use your judgment based on your own stovetop and pan, but this typically means keeping the burner on a medium-low setting.
From time to time, use your spatula to press down on the grilled cheese to make sure it's melting and browning evenly. During cooking (which should take a total of about five minutes), flip the sandwich at least once more to brown the top side. You're welcome to flip it more if it helps you achieve even melting and browning, but it shouldn't really be necessary. Toward the end of cooking, you can lower the heat and place a lid on the pan to aid in melting if you like. Don't leave it on for more than a minute or so, to ensure that the bread remains crisp and doesn't steam.
When cheese is melted and bread is golden-brown, remove the grilled cheese to a cutting board or plate, cut in half and serve.