I think that it is a mix of both,as far as mental predisposition towards a set ideology, people are predisposed to different modes thinking, some are more left brained, some are more right brained. Some minds work better with abstract, some better with hard factual evidence, some are more emotional, some are more logical. Some people are more individualistic, others more social. . Brain chemistry could also have an impact as well, for example some brains could be more wired to be empathetic than others. These all could potentially have an impact on ideology.
My personal anecdotal evidence on the subject: I was adopted, although I was less than a month old at the time. My ideology is uniquely my own, and is in staunch contrast to my parents, most notably to my fathers.
Despite being raised and being taught a certain mindset, and attempts to steer my mind towards his world outlook, it did not take, nor would it have ever, my mind is not wired the same as his and as has been demonstrated repeatedly over the course of my lifetime we inevitably will reach polar opposite conclusions or stances given the same sets of data. I am quite confident that a significantly large reason behind the ideological differences between my father and I are not a result of learning, nor life experience, but rather a result of us not being genetically related, and the dissimilar way in which our minds function is a result of this.
I do not think there is a one size fits all answer here, different people will take different routes in developing their worldviews. Some may be more influenced by mental processes, for others it may be more dominated by a learned response.