Spray a waffle iron with cooking spray and preheat according to manufacturer's instructions.
Arrange 4 bread slices on a work surface and spread 1 tablespoon pesto onto each slice. Drizzle 1 teaspoon balsamic vinegar onto each of the remaining 4 bread slices. Arrange 1 mozzarella cheese slice and 1 ham slice on pesto bread and top with balsamic bread.
Cook each sandwich in the prepared waffle iron until cheese is melted and bread is golden brown, 3 to 5 minutes. Spray waffle iron with more cooking spray before cooking each sandwich.