The word uchi
This has multiple possible spellings. Uncommon / rare spellings marked with a †:
- 打ち -- "hitting, striking"
- 宇智 -- name of a former county in Nara prefecture
- 有知†, 有智† -- knowledgeability; a knowledgeable person
- 内, 中† -- "inside, interior"
- 家 -- "home; the inside of a building"
- 裡† -- "the duration of a certain state"
The top three aren't relevant here, and don't appear to be related derivationally, so let's ignore those for the rest of this post.
Sense Development
According to the entry in the big Kokugo Dai Jiten (KDJ; a bit like the Oxford English Dictionary only for Japanese), the sense of "inside, interior" is apparently attestable all the way back to 720 in the Nihon Shoki. See definition [1]-②. The core meaning appears to be "interior", but specifically "of an enclosed (or enclose-able) space".
Not long after, in the Man'yōshū poetry collection completed around 759, we see uchi used to mean "house, home, residence; place of business", as an extension of the "interior (of a building)" sense. See definition [1]-⑩-(ロ).
Much later in 1563, the word is attested meaning "my home, my house". See definition [1]-⑩-(イ).
Three and a half centuries after that in 1916, we see citations of uchi used to mean "I, me, myself", presumably as an extension of the "my home" sense. See definition [2]. The entry describes this usage as primarily feminine and primarily Kansai.
Summary
So in essence, the meanings developed historically in order as:
- "inside, interior"
- "house"
- "my home"
- "I, me, myself"