These are two separate endings with quite different meanings. It's best to think of them as sort of homonyms.
The first example uses Verb+은 지 [time] 되다, meaning "time since something happened":
동생이 밥을 먹은 지 1시간이 되었어요. It has been 1 hour since my younger (brother) ate.
However, in the sentence "동생이 밥을 먹었는지 몰라요.", a different ending is being used; here, the verb ending "는지" is used to mean "whether,", and is normally used with the verbs 모르다 and 알다: (not) know whether...; the ending can take different forms:
먹는지 모르다 (present): not know whether he eats/is eating
먹었는지 모르다 (past): not know whether he ate
먹을지 모르다 (future): not know whether he will eat
배 고픈지 모르다 (adjective): not know whether he is hungry
The reason the first has a space (띄어쓰기) before 지 is that it is 지 is analyzed as an 의존명사 (dependent noun); there are many structures in Korea in the firm [verb participle] + dependent noun. On the other hand, in the second case, 는지 is analyzed as an 어미 (verb ending) that attaches directly to the verb.
I'm not sure whether the distinction is essentially arbitrary or if there's a solid basis for analyzing them in these 2 different ways. Many Koreans make 띄어쓰기 mistakes in cases like this, but it's the official spelling and grammatical analysis published in dictionaries and taught in schools.