Combine pesto and mayonnaise in a small bowl.
Arrange 8 slices of bread on a board and spread each with butter. Flip all of the slices and spread with pesto mixture. Divide basil across half of the slices. Top with tomato slices and 1/2 cup shredded chicken. Pile 1/3 cup shredded cheese evenly on top of the tomatoes. Top with remaining bread slices, pesto side down.
Preheat a large skillet over medium heat. Carefully transfer one sandwich to the skillet and cook until bread is golden and cheese is starting to melt, 2-3 minutes. Flip and cook another 2-3 minutes, until cheese is fully melted. Repeat with remaining 3 sandwiches.