Place the edamame, corn, scallion, garlic, olive oil, the salt, and pepper into a 9-by-13-inch metal pan and stir to combine. Place on the middle rack of the oven and roast until the edamame just begins to brown, 10 to 15 minutes. Remove from the oven and place in the refrigerator until completely cool, about 30 minutes.