In both cases, biodiesel pressed from soy beans and ethanol distilled from corn kernals, much of the food value for animal feed remains after the process is complete. For biodiesel, you are left with a high protein cake after oil pressing and for ethanol you are left with "distillers grains". Both of these make a fine animal feed (where most corn and soy beans go anyway).
Brazil, although it devotes to huge areas to sugar cane, is also one of the world's big food exporters. Midwest farmers are always keeping an eye on weather in Brazil to try to understand how their crop yields might compete with our crop yields (like for soy beans). If fact, China has written huge contracts with Brazil for soy beans. So... if there is a shortage of rice and beans in Brazil, it is not because there is not enough acreage to grow it.
As far as food shortage from using "food" to create fuel, as I say, there is plenty of food value left after processing. If we ever did worry about that, we could simply start to shift our production of meat. Beef takes the largest amount of vegetable protein to create (20 pounds of vegetable protein to raise one pound of beef). Hogs take less and poultry even less. That is why you often see the world's poorest countries focusing on hogs and poultry for their meat.
As a 20+ year vegetarian, it won't bother me to see people shift to more vegetable protein in their diets! Whole societies in India have been doing this for centuries.
I hope we rapidly research energy crops that don't detract from our food supply at all. It seems like algae would be like that and switchgrass too. Switchgrass is a perennial (once planted, grows year after year with no re-planting) ...so no annual tilling, no replanting, tiny fertilizer inputs compared to corn, holds the top soil and actually builds it (unlike corn which practically promotes soil erosion the way we kill off all the weeds so they don't clog the harvesters and pollute the corn yields. It even seems possible to develop a switchgrass field mix of native plants that complement each other (like native legumes that fix nitrogen in the soil) so that no fertilizer is needed at all. I heard a guy say (I think in that CNN special) that cellulosic ethanol from switchgrass would be on-line in 5 years at a commercial scale. There is a pilot plant in Canada operating right now.
As far as which is more cost efficient, biodiesel or ethanol, you get higher per acre yields with ethanol from corn but somewhat similar yields for net energy as biodiesel from soy beans due to the much higher energy balance of soy biodiesel vs. corn ethanol.
See table: