Some key points to consider when analysing your sentences:
1. Using the terminology of the Dictionary of Japanese Grammar series, your sentences are of the format S1 toki S2
(Sentence 1 とき Sentence 2).
2. According to that dictionary's explanation (p493 of 'A Dictionary of Basic Japanese Grammar'), when S2 is past tense and S1 expresses a state, you can use either past or nonpast in S1.
3. The verb 'live' is usually considered to be a stative verb (a verb that expresses state), at least in English (here, for example).
4. Therefore, since S2 is past (でした) and S1 expresses a state (住む), the verb in S1 can be either past (住んでいた) or nonpast (住んでいる). The meaning is identical for the phrases, according to their definition.
5. While your examples are grammatically correct, it would still be more natural to use the sentence 子供の時、ローマに住んでいました, as pointed out by another user. This construction emphasises that you are talking about a period of time in childhood. The 'living in Rome' time period is a subset of the total 'childhood' time period, not vice versa. As an analogy, consider how a similar restructuring might sound in English:
(A) I lived in Rome and I was a child.
(B) I was a child when I lived in Rome.
These are not direct translations of your sentences but the point is that show that while both are grammatically correct, Sentence A sounds strange because of the emphasis on living in Rome. Sentence B sounds natural because the relationship between the elements is correct.
6. The rules are different if the S1 expresses an action.