This is a hard question and I'm not sure members will agree with my reply, but I think it could at least serve as a starting point to develop more and better rules.
There are always some idiomatic issues that will shake the foundations of any rule, but, in principle, I'd say that the rule that determines whether the noun functioning as object to a preposition should take an article or not is the same that applies to nouns in general:
Nouns used in a generic way, whether singular or plural, will not take the article. Specifically, singular noncount nouns don't take an article when they refer to a material.
Nouns used in a specific way, or nouns which always take the definite article, will take the article within a prepositional phrase, unless they are used to typify.
There are exceptions to the rule, for example: nouns under (2) will not take the article when used to typify.
1 camino de tierra ("tierra" here refers to a material)
1 escuela de idiomas ("idiomas" is used generically)
1 casa de papel ("papel" is the material)
2 estado del arte ("el arte" is a specific activity)
2 dirección del trabajo ("el trabajo" refers to somebody's job; the adjective "laboral" would sound more general)
2 museo del oro (if we said "museo de oro", "oro" would be the material the entire museum is made of)
2 Museo del Aire (if we said "museo de aire", it would seem that the museum is ethereal)
2 escuela de la vida (we also have "escuela de vida" to mean a type of learning based on life experiences)
2 Escuela de la Calle ("de calle" is only used to typify, for example "ropa de calle", meaning clothes to go out, not to stay home)
2 casa del libro (the count noun "libro" always takes an article)
3 día de trabajo ("de trabajo" is used to typify, as opposed to "descanso" or "vacaciones", being equivalent to the adjective "laboral")
3 museo de antropología ("de antropología" is used to typify, being equivalent to the adjective "antropológico")
3 museo de arte ("arte" is used to typify, being equivalent to the adjective "artístico")
3 gafas de sol (we say "el sol" but "de sol" indicates a type)
3 villancico de navidad (here "de navidad" is used to typify, meaning "navideño")