Do you think that it's possible to wind up with a more Han Solo type of character in traditional D&D play? Does the game as written actively promote one over the other (generally speaking, accepting that there will be exceptions with some gaming groups)?
I think there are challenges in this respect, once we consider (i) D&D's mechanics and (ii) the typical range of D&D play.
Historically, the emphasis in D&D has been on
consistency of character. Alignment rules pushed towards consistency - eg in his DMG, Gygax says (p 25) "Changing of alignment is a serious matter, although some players would have their characters change alignment as often as they change socks. Not so!" Part of the rationale for this is a perception - an accurate one, I think, in classic D&D play - that
changing one's character is exploitative or abusive, avoiding the obligation to engage the challenges of the game with the role one has chosen.
The importance of consistency, and its relationship to "good roleplaying", is also suggested in other passages of Gygax's rulebooks:
Experience points are merely an indicator of the character's progress towards greater proficiency in his or her chosen profession. UPWARD PROGRESS IS NEVER AUTOMATIC. . . . Consider the natural functions of each class of character. Consider also the professed alignment of each character. (DMG p 86)
You act out the game as this character, staying within your "god-given abilities", and as molded by your philosophical and moral ethics (called alignment). . . . While involuntary change of alignment is quite possible, it is very difficult
for a character to voluntarily switch from one to another . . . {PHB pp 7, 34)
A second factor is that D&D doesn't, by default, provide "hooks" that link the PC into the sorts of interactions that produce circumstances or pressure for change. The PC build is generally quite a bit less than a total picture of the character (this contrasts with fuller "skill system" builds, or Pendragon's traits, etc) and this means that the natural process of developing the PC over time, and bringing the PC's abilities to bear on situations in play, doesn't tend to reveal the character or changes in the character. (In my mind, a clear contrast here is with Rolemaster play, where every level involves a choice of skills to develop, which reveals something about how the PC is changing - or not - in response to the vicissitudes of the fiction.)
A third factor - related, to an extent, to the previous one - is the typical nature of D&D adventures/scenarios. They tend to be "external" problems that the PCs are recruited to resolve, and hence that don't implicate the PCs own concerns and relationships.
I think all these things push against the sort of "Han Solo" character transformation you describe.