Theologically speaking, any adult Catholic male can be elected pope. However, the likehood of a non-Cardinal being elected pope is extremely low. It is not even necessary that the elected be a bishop; in fact, the constitution governing the election of JPII’s successor has instructions regarding this stating that if a person who is not a bishop were to be elected, he must be ordained immediately after indicating his assent to his election.
In addition, there are certain barriers that would legally (but not theologically) bar some men from election. For example, the current law is that a married man can not be ordained a bishop. Since the Cardinals have no authority to change the laws of the Church, an election of a married man would automatically become invalid since he could not be ordained a bishop in order to ascend to the papacy.