The problem with this hypothetical is that it isn't a possible real world situation. In the real world, there is no guarantee that any intended policy will have the intended effect. Hence, there is no possible scenario where we're guaranteed
unsurpassed personal and social liberty and grow the economy by 10% each year.
So we aren't really weighing the guarantee of those things against the candidate being an atheist with a child out of wedlock. What we're weighing is a candidate who has *debatably* good or bad ideas against the "downside" of him being an atheist with a child out of wedlock. In that real world scenario, the answer is no, this electorate will not elect him.
However, if by some theoretical method we could have a mathematical certainty of an extremely positive outcome for the nation, I think we probably world. But not in the real world where people who don't like the candidate being an atheist can always argue that his policies are bad and use it as a pretext to not vote for him.