Wikipedia here states that mandir is a sanskrit word.
What is the etymological meaning of mandir?
Before I begin, I would like to mention that the study of etymology or Nirukta, one of the six Vedanga, can provide beautiful insights into the practice of Hinduism. As you read further, this will be showcased.
This seemed like a simple question at first. Although, I needed to a lot of research to get the etymology of it. There are two aspects of the question that I cover: Word roots both in and out of sync with Hinduism, Timeline of word usage and Hinduism.
There are two main viewpoints on the word root that I have come across.
A faulty interpretation by Monier Williams:
Monier Williams in his A Sanskrit-English Dictionary, etymologically and philologically arranged says that the word mandira according to some is said to be from the verb root mand.
Each word in Sanskrit language can have multiple meanings. The verb mand means - to become drunk or inebriated, to be glad, to rejoice, to exhilarate, to be praised, to be celebrated, to praise, to sleep, to languish, be languid, to move slowly, tarry, loiter, hesitate, stand still, pause, to be beautiful, to shine.
The current context context in which the noun manda is used in Hindi is to refer to a mentally slow person. In my opinion, Western scholars show a biased lens towards such interpretations, sometimes due to a lack of understanding of the culture as they are an outsider and sometimes due to faulty intentions. To subscribe the meaning of the word mandira to the word manda which has a lot of negative interpretations makes no sense. (Although, it has a lot more positive interpretations too).
An interpretation in sync with Hinduism:
Sadly, there are not many Indian Sanskrit scholars whose etymological work is famous (atleast, not in my notice). The second interpretation comes from Krishna G. Rampal in his book Sacred Structures: Artistic Renditions of Hindu Temples in Malaysia and Singapore. He writes:
The word mandira is derived from the words man which symbolises inner-self and dir which means a dwelling place. In several Hindu texts, the Lord is described as one's "inner-self". A Hindu temple can be a separate structure or part of a building. Most practising Hindus maintain an altar at their homes for daily worship and meditation.
This interpretation makes much more sense. I would like to add to this. The word mandira can be seen to originate from the words manas and dhiraya. The word manas means - imagination, intention, mind, spirit, mood, perception, intelligence, desire, thought. The verb dhiraya means - gets comfort, is encouraged. dhiraya in Sanskrit can be seen as the root of dira in Hindi . Hence, mandira means a place where the mind gets comfort, intelligence and imagination is encouraged.
The above meaning have been taken from Samskrita Sabdartha Kaustubha – A Sanskrit-Hindi Dictionary by Dwarikaprasad Chaturvedi. (I have translated the Hindi words to English for the convenience of the readers).
The common feature in both the charts is that they peak at the year 1877. If we look at the Indian history, the first mutiny against the British was in 1857. It is said that after that the Brahmins tried to unite the Hindus against the British. This can be seen in correlation to the peak of the usage of the word mandir.
Although, the later parts of the Collins chart still shows low usage of the word, which might be due to their definition of usage.
I hope this helps in answering your question. :)
In Sanskrit, the liturgical language of Hinduism, the word mandir means "house".
Edit: According to Sanskrit-English Dictionary by Monier-Williams "a habitation, dwelling house, palace; a temple, pagoda; an apartment; a town; a camp; any abode or dwelling"