Is it safe to cook in a grill\oven that is rarely cleaned?
The build up on the oven walls is likely grease.  

Food contamination risk is low to none if they don't touch.  

The bigger risk is a grease fire.