In a small skillet, melt 1 tablespoon butter over medium heat. Add the onion, season with salt and pepper and cook, stirring occasionally, until caramelized, about 15 minutes. Set aside.
Heat a griddle or 2 large skillets over medium heat. Top 4 bread slices with the cheese, reserved onion and pear. Cover with the remaining 4 bread slices.
Melt the remaining 1 tablespoon butter on the griddle, add the sandwiches and cook over medium-low heat until the bread is toasted and the cheese is melted, 3 to 4 minutes per side. Cut in half.