In a food processor, pulse pistachios until resembling course meal. Add garlic and parsley, run processor until minced. Drizzle in lemon juice, olive oil, and salt. Run food processor until pesto comes together, adding more olive/lemon juice as needed.
Preheat grill pan or regular pan over medium-low heat. Brush outsides of bread with olive oil. Place on piece of bread, olive oil side down, in the grill pan and smear on 1 tablespoon of pesto. Layer with sliced red onions and cheese. Smear 1 more tablespoon of pesto on remaining piece of bread and place olive oil side up.
Cook on each side until crisp and cheese has melted.