Upvote:2
First of all, you assume that the building of imponent religious buildings was due to competition with other religions. But as MAGolding comments, for most of the history there was little "competition": each region/country has its main religion and that would be the one that would get almost all of the support & resources; if you were lucky other religions would be tolerated but even then the minoritary religion temples would be generally rather humble (both due to lack or resources and because it would not be wise to be seen as a "challenger" to the main religion themples).
What you are missing is:
For most of the history, religions have amassed inmense fortunes. Simply put, they had the means to build such constructions, so why not?
Intra-religious rivalry. The bishop of Paris would not want or need to compete with the Hagia Sophia in Istambul; few people would ever see both of the buildings to compare, and anyway there was no direct relation. But the bishop of Paris could want to show that pesky bishop of Rouen whose diocesis was more important, richer and prestigious.
Similarly, one of the ways of showing the wealth of the upper class was to finance religious buildings (whole or in part). If the count of Seville decided to build a church, everybody would commend his piety, and everybody in the street would know where the funds for that church did come from. Making them as important as possible would serve to show both the count's piety and wealth.
In any case, I think that the best example of what you ask for would be the Baroque style and the Counter-Reformation; specially the Council of Trent that impulsed the advent of Baroque Art as a means of propaganda to fight against the Reformation.
The Council of Trent proclaimed that architecture, painting and sculpture had a role in conveying Catholic theology wikipedia