Place 1 slice of tomato on the center of the plate. Spoon one tablespoon of the goat cheese onto the center of the tomato slice. Arrange the cucumber slices on top of the goat cheese and then put the second tomato slice on top. Next, spoon the second tablespoon of goat cheese onto the top of that slice of tomato, and arrange the pickled red onion on top of that. Last, place the final slice of tomato on top, and spoon the roasted corn over the entire stack. Garnish the plate with the basil pesto.