Layer each of 2 bread slices with 1 slice cheese. Top with apple and onion. If desired, sprinkle with pepper flakes. Top with the remaining cheese and bread. Spread outsides of sandwiches with butter.
In a large skillet, toast sandwiches over medium-low heat 3-5 minutes on each side or until golden brown and cheese is melted.