This topic is pretty closely related to my brother's last post concerning the ways you can differentiate characters in a large cast. There is a major factor regarding that I want to mention: making the act of recruiting a character itself distinct is one of the most important things for making a character memorable. Often, in a game in which you can recruit a large number of optional characters, optional characters will not have any importance to the plot and will have few story elements based on them. In games like that, the only story sequences where a designer has room to make a character memorable is the scene in which you recruit the character.
A good example of this principle at work is seen in the Suikoden series of RPGs. It is a good example for two reasons. The first reason is that, in playing through those games, I have recruited hundreds of characters, but only a fraction of those characters actually stick out in my mind. The second reason is that there is a wide variety of different ways you use to recruit characters in those games, ranging from characters who can be recruited simply by talking to them, to characters who require extremely complex and long sidequests in order to be convinced to join. As a whole, I believe that characters who are harder to recruit are much more memorable and interesting.
A good example of this principle in action is seen in the character of Jeane in the Suikoden series. In Suikoden 1, you can recruit her simply by talking to her and asking her to join. In Suikoden 2, Jeane appears again, is recruited the same way, fulfills the same important role in your team, and I did not even recognize her as a recurring character until I played Suikoden 1 again. However, by Suikoden 5 she is one of the only two characters to have appeared in all five games (even though one is set over a hundred years apart from the rest), and recruiting her involves diving down into an forgotten ancient ruin of a lost civilization in order to "retrieve something she left behind". A character who was easily forgettable in the first few games is transformed into one of the most mysterious and interesting characters of the Suikoden series, simply by moving the unusual aspects of her character into the phase when you trying to recruit her, rather than leaving it wrapped up in hidden scenes and hard-to-acquire information.
Another good example is the set of gamblers who appear in the Suikoden games. Almost every gambler in that series requires that you defeat them in their preferred game of chance before they will join. All of these characters are completely forgettable, and are so uninteresting that I don't even feel like looking up their names. In a variant of this, the character Linfa from Suikoden 5 is a gambler who makes a similar challenge, cheats you out of your money in order to pay off her debts to a suspicious individual, and then challenges you to a game several more times in several more places while showing contradicting goals and motivations, before eventually being forced into joining your group by the suspicious individual. As a result, Linfa is given a chance to be portrayed as a character with her own story, rather than just a random gambler whose only character trait is a love of gambling.
As a whole, I consider Suikoden 5 to have one of the best casts of optional characters in any of the Suikoden games, and that is in large part due to the unusually high difficulty of recruiting characters in that game. There are some potential allies who have very involved and fun sidequests in that game, many of which reveal interesting things about the main plot. In contrast, I can hardly remember any characters at all from Suikoden 4, a game where the majority of characters are recruited simply be talking to them, and of those characters I remember I can't think of many distinct traits.
Anyways, these musings should not be interpreted as a statement that recruitment difficulty and complexity is the only factor in determining how memorable a character will be. Things like concept, character design, novelty, and mechanical usefulness are extremely important, after all. However, a lot of those traits will never be shown off properly unless the player is given the time to actually pay attention and learn about those things, and one of the best opportunities is when that character is being recruited.