I do not think any Church teaching allows people to justify living in a house they cannot afford. Maybe with the incredible amount of wealth, the Church may find that a trailer or apartment is sufficient, but not a home. I could be wrong
Some quotes I can think of from the CCC.
2425 The Church has rejected the totalitarian and atheistic ideologies associated in modem times with “communism” or “socialism.” She has likewise refused to accept, in the practice of “capitalism,” individualism and the absolute primacy of the law of the marketplace over human labor.207 Regulating the economy solely by centralized planning perverts the basis of social bonds; regulating it solely by the law of the marketplace fails social justice, for "there are many human needs which cannot be satisfied by the market."208 Reasonable regulation of the marketplace and economic initiatives, in keeping with a just hierarchy of values and a view to the common good, is to be commended.
scborromeo.org/ccc/p3s2c2a7.htm
2442 It is not the role of the Pastors of the Church to intervene directly in the political structuring and organization of social life. This task is part of the vocation of the lay faithful, acting on their own initiative with their fellow citizens. Social action can assume various concrete forms. It should always have the common good in view and be in conformity with the message of the Gospel and the teaching of the Church. It is the role of the laity "to animate temporal realities with Christian commitment, by which they show that they are witnesses and agents of peace and justice."231
scborromeo.org/ccc/p3s2c2a7.htm
2427 Human work proceeds directly from persons created in the image of God and called to prolong the work of creation by subduing the earth, both with and for one another.[209] Hence work is a duty: “If any one will not work, let him not eat.”[210] Work honors the Creator’s gifts and the talents received from him. It can also be redemptive. By enduring the hardship of work[211] in union with Jesus, the carpenter of Nazareth and the one crucified on Calvary, man collaborates in a certain fashion with the Son of God in his redemptive work. He shows himself to be a disciple of Christ by carrying the cross, daily, in the work he is called to accomplish.[212] Work can be a means of sanctification and a way of animating earthly realities with the Spirit of Christ.
christusrex.org/www1/CDHN/seventh.html
People are called to live with what they can and the faithful are to help those that are less fortunate not provide every luxury. Please correct me if I am wrong.
God Bless