Spread a thin, even layer of softened butter over one side of each slice of sourdough.
Flip the bread over so the buttered sides are facing down.
Layer one slice with: shredded mozzarella, prosciutto, sliced fresh mozzarella, fresh basil leaves, and pesto.
Top with the remaining slice of bread, buttered side facing out.
Heat a large skillet or cast-iron pan over medium-low heat.
Place the sandwich in the pan and cook for 4–5 minutes per side, pressing gently with a spatula, until the bread is deeply golden and crisp and the cheese is completely melted.
Transfer to a cutting board and let the sandwich rest for one minute before slicing.
Serve immediately while the cheese is perfectly gooey.