Wow,this is a complicated one.I will try my best to explain but don't expect you can get it all just by one explanation,you have to have linguistic instincts for this.
First of all,in most cases ,the adj+noun format is correct both with or without 的,unless you want to put some stress on the adj.For example,A:That is a girl B:Not just a girl ,she is a BEAUTIFUL girl。 In this case,A:那是个女孩儿,B:一个(漂-亮-的)女孩儿,in this case it is better to have a 的 instead of without it.Otherwise I think it is mostly right both ways,with 的 or not.But with a 的 ,it makes things more formal.And I will elaborate a bit more on your examples.
Both 漂亮的女孩儿 and 漂亮女孩儿 are right,and basically mean the same thing.The very subtle difference it is more formal with a 的 ,so when you write stuff ,better with a 的.
好吃的美食 sounds fine,but 好吃美食 ...a bit awkward to my ears ,if not necessarily wrong.The third example you gave is even trickier,both being correct,but having different stresses slightly.
中国老师 stresses that the teacher is from China,stressing the ethnicity or citizenship.中国的老师 sounds more stressing the teacher China has.Like when doing patriotic propaganda you have.But it is a very subtle difference and can be used interchangeably without causing confusion.
The reason I explained your examples is because there probably is not grammatical summary on this,even if there is one,99.9% percent of Chinese people don't know it.But I can feel whether something sounds right or not with or without a 的.
I humbly advise you to pay less attention to grammar and devote more effort to osmosis,Chinese people are in every corner of the world ,try to find some and talk to them ,that will be much more helpful than analyzing grammar.I hope I haven't bored you by writing so much.And best wishes to your Chinese learning.