Heat the olive oil in a skillet over medium heat.
In a bowl, combine the shredded chicken, marinara sauce, mozzarella cheese, Parmesan cheese, Italian seasoning, salt, and pepper. Mix well.
Place one slice of sourdough bread in the skillet. Spoon the chicken mixture on top, spreading it evenly.
Top with the second slice of sourdough bread. Cook for about 3-4 minutes until the bottom is golden brown.
Carefully flip the sandwich and cook for another 3-4 minutes until the other side is golden and the cheese is melted.
Remove from the skillet, slice in half, and garnish with fresh basil leaves if desired.