I first read this book when I was very young and starting to enjoy such of the Heinlein "juveniles" as I could find in local libraries. Several years later, maybe the third or fourth time I read the novel, I started asking myself much the same question as yours: "What's so shameful about being rescued from slavers? I can understand gratitude toward the rescuer, but where does unspeakable shame enter into it?"
I finally developed a hypothesis. There's a key passage from Chapter 14 which was probably the major influence on my thinking at the time. I'll quote it; then I'll explain what I suspect it means. Thorby is talking to Fritz (his adoptive brother) about Baslim's past.
"Uh, I am curious about one thing. What was the debt that made
Grandmother willing to adopt me?"
"Uh, 'I have said enough.'"
"You know best."
"Oh, confound it, the rest of the People know! It's bound to come up
at this Gathering."
"Don't let me talk you into anything, Fritz."
"Well . . . look, Baslim wasn't always a beggar."
"So I long since figured out."
"What he was is not for me to say. A lot of People kept his secret for
years; nobody has told me that it is all right to talk. But one fact
is no secret among the People . . . and you're one of the People. A long
time ago, Baslim saved a whole Family. The People have never forgotten
it. The Hansea, it was . . . the New Hansea is sitting right over there.
The one with the shield painted on her. I can't tell you more, because
a taboo was placed on it -- the thing was so shameful that we never
talk about it. I have said enough. But you could go over to the New
Hansea and ask to look through her old logs. If you identified
yourself -- who you are in relation to Baslim -- they couldn't refuse.
Though the Chief Officer might go to her cabin afterwards and have
"Hmm . . . I don't want to know badly enough to make a lady cry. Fritz?
Let's try this ride." So they did -- and after speeds in excess of
light and accelerations up to one hundred gravities, Thorby found a
roller coaster too exciting. He almost lost his lunch.
In this passage, as we become aware just a bit later as the plot develops, one of the things Fritz was holding back was that Baslim had been a career military officer, "Colonel Baslim of the Hegemonic Guard," until he took his crippling injuries and transferred over to intelligence work (a branch known as "the 'X' Corps"). In recent years Baslim had been working undercover as a one-legged beggar in Jubbulpore, and the People had scrupulously protected his secrets while carrying encrypted messages for him when they could. This was something they wouldn't have done for anyone else who had not been born within their culture. But admitting to those simple facts wouldn't cause the Chief Officer of the New Hansea to have a nervous breakdown, would it?
Fritz's talk about "taboo" and "so shameful that we never talk about it" and so forth, combined with his prediction of how the Chief Officer would react if Thorby absolutely insisted upon studying the ship's records, led me to the following conclusion:
Once upon a time, a Free Trader ship was captured by slavers. But not just by sheer bad luck, as occasionally happens. This time there was a Judas in their midst who was somehow bribed to betray the trust of his entire clan (the dozens of other people who lived in, and operated, the ship). Someone was willing to sell his relatives down the river as long as he personally made out like a bandit. When Colonel Baslim led the rescue party which liberated the captives of the Hansea, and which cost Baslim himself one leg and one eye before all the shooting was over, this really rubbed the People's noses in the fact that sometimes even a mere "fraki" could exhibit great honor and courage in risking his own neck in defense of some of the People (with whom he had no family ties, and to whom he had owed no previous debt), in sharp contrast to the way someone born and raised in their culture had exhibited a profound lack of honor when he sold his soul (and sold out his own kith and kin) in exchange for filthy lucre. (Or whatever he was offered -- perhaps his own private harem of beautiful slave girls, or something along those lines? We can't tell what the precise incentive was.)
For all I know, the unnamed person in question might have been severely mentally ill, and thus not fully responsible for his (or her) own acts. But that's sheer speculation.
This explains why the current Chief Officer might break down and cry if she were forced to dig out those records and let Thorby see them. Because of the reminder of the disgraceful behavior of one of her own relatives, a few decades ago -- something she presumably prefers to never even think about if she can avoid it.
Here's another quote, from a scene in Chapter 10, in which Captain Fjalar Krausa is explaining to Thorby about how he, as Baslim's adopted or foster "son" for many years (before he recently became Krausa's adopted son), could arguably be considered as having secretly been a member of the People all that time, even if he didn't know it!
He changed the subject. "In a way, lad, you were always of the People."
"Huh? Excuse me, Father?"
"Son, Baslim the Cripple was an honorary member of the People."
"What? How, Father? What ship?"
"All ships. He was elected at a Gathering. Son, a long time ago a
shameful thing happened. Baslim corrected it. It put all the People in
debt to him. I have said enough. Tell me, have you thought of getting
Marriage was the last thing on Thorby's mind; he was blazing anxious
to hear more about what Pop had done that had made him incredibly one
of the People. But he recognized the warning with which an elder
closed a taboo subject.
So my reconstruction would go this way: At a Gathering of all the clans, there was a big vote to make Baslim an honorary member because of his recent rescue of the Hansea's people. This was done partly out of gratitude, and perhaps partly because it retroactively made everybody feel better about the idea that "the horrible betrayal by one of our own was corrected by another one of our own -- as opposed to just having been corrected by some mere fraki!"
And if Baslim was one of the People, then any son of his could make a claim to being a long-lost relative of the People, even though I doubt anyone consciously had that point in mind at the time they first elected Baslim to honorary People status. (We never hear about his having been married with children during his military career, so I doubt there was any need to raise the issue, at that old Gathering, of whether or not his new status should be considered to carry over to his sons and daughters.)
Anyway, all of the above is the best I can do at making some deductions from the available clues.
Note: You asked about the possibility that the entire ship had been somehow involved in the slave trade (as willing participants, rather than as victims). I don't think so. For one thing, there's a bit where Colonel Brisby and his Executive Officer (Vice Colonel Stancke) are reminiscing about Baslim -- both of them had known him, in different times and places.
"I'm no hero. I'm more the salt of the earth. Pappy, were you with him
in the rescue of the Hansea?"
"You think I would fail to wear the ribbon? No, thank goodness; I had
been transferred. That was a hand-weapons job. Messy."
The "rescue" -- not the "capture." So I don't think anyone had accused the entire ship's crew, or even just its upper leadership (such as the Captain and the Chief Officer and their department heads) of conspiring to aid and abet in the enslavement of other people. Instead, they (or most of them) had somehow been captured alive and were facing a miserable existence from then on -- until Baslim came to the rescue.
If the whole extended family aboard the ship -- or at least several of its senior members -- had all "gone rogue" at once, I really don't think that ship, and its occupants, would ever have been welcomed back with open arms by the rest of the Free Traders. I think the evidence suggests there was just one very bad apple in the barrel who caused all the trouble. Presumably, he died (during or shortly after Baslim's raid, either killed in the heat of battle, or else executed after a quick trial by his peers if he'd been captured alive during the rescue mission), and the rest of the survivors of the Hansea were able to go back to "business as usual" since everybody knew that none of them had done anything vile. But the embarrassing memory still hung over them like a cloud.