Season the chicken with salt and pepper. In a skillet over medium heat, add olive oil and cook chicken slices for 4–5 minutes per side, or until golden and cooked through. Set aside.
Butter one side of each slice of sourdough bread. Place the slices, buttered side down, on a clean surface. Spread pesto on the inside of each slice (opposite the buttered side).
On one slice of each sandwich, layer cheese, cooked chicken, tomato slices, and optional greens. Top with another slice of cheese and the second slice of bread, buttered side facing out.
In a skillet or pan over medium heat, cook the sandwiches for 3–4 minutes per side, pressing gently, until the bread is golden brown and the cheese is melted.
Slice in half and serve immediately while warm and melty. Perfect with chips, soup, or a simple green salad.