as you know that.. in Japanese there is a conflict and lots of misunderstanding
for using particles like " が" and " は" .Basically " が" or "は" is a
subject particles. But sometime "が" is also use to emphasis your dialogue.
like " すみませんが"。
Here in your sentence "子供のとき、何になりたかったですか。" 何 is actually
a character and " に" particle stands for the existence of that character.
in other words " in your childhood you want to be like someone or you may
say that you want the existence of someone in you. As we know that the
"に" is a existence particle like," 机の上に" here "に" indicates that
something is existing on the table. So i thing that why in your composition
" 何に"is preferable against " 何が。