What’s the difference in taste between grilling in a pan of cooking in the oven?

I like to cook/bake my vegetables in the oven, especially when I have to make a lot of them at the same time. I have a grilling pan as well and I don’t really know if I taste a difference in vegetables like zucchini or egg plant prepared in the grilling pan and in the oven. Still a lot of recipes specifically state to use the pan. Why would that be?