Rack vs Baking Pan vs Roasting Pan and Position What are the differences in cooking in the oven between putting the food directly on the rack, putting it on a baking pan, and putting it in a roasting pan? 

How does the existence of metal under the food affect the food vs rack? Do the higher sides of the roasting pan make a difference over a baking pan? Do different types of surface/material make a difference? 

While we're at it, do these vary with position in the oven (top, middle, bottom rack)? 

I'm recovering from a surgery and we ordered some freshly prepared meals. Directions for Eggplant Parm said to place in 350F oven for 15-20 minutes. We placed in a roasting pan in case it bubbled over and it took a good 40 minutes. I'm wondering if the pan was the cause or just that the directions were terrible. The oven was properly preheated and while I've never checked the temperature of it, we use it regularly and have never had the same issues with time variation.
A higher-sided pan can end up holding more moisture in near the food, and prevent it from cooking up quite as quickly than in a sheet pan.  This won't be as noticeable in a convection oven.

If something calls for placing it directly on the rack, it likely won't crisp up if you put it in a pan for this reason, as well as reflecting (shiny) or absorbing (dark metal) the radiant heat before it gets to the food.  Glass dishes will let the radiant heat through, so the bottom will brown a bit better, but there's still the moisture issue.

If by 'roasting pan' you mean a rack suspended above a pan, then it'll be a little between the two -- you won't have the food necessarily steam underneath as much, but you still have a pan there to deflect radiant heat.

As for location in the oven, it'll often affect how quickly the top of the food cooks vs. the bottom.  (closer to the top element means the top will cook more quickly)