Some characters of the less salubrious kind if it’s a gritty historical, could be guilty of prejudice, prostitution, cruelty or whatever, for which the reader will feel no respect. We live in a world with certain demands of political correctness and moral requirements. Our society disapproves of prejudice and bigots, racialism, chauvinism, sexism, provincialism. Remember your characters are people of their own times who may accept some of these issues. You must allow them to act according to their own standards, not yours. Don’t pass judgment on them by making excuses or being dismissive. Don’t apologize for their mistakes and don’t attempt to make them all into free thinkers who are ahead of their times. You have to be able to see the story from their perspective, even if it offends you. And if they are more of a villain to a mistaken hero, they’ll pay the cost for their dreadful behaviour.
A less well known figure may seem easier to write about but not as interesting. But using real historic figures can be difficult and inflexible, making you feel constrained by the facts and details you can’t find an answer to. Readers too have their own perception of these real historical figures, sometimes wrong ones. If you feel it might be a problem to develop them in a way to suit your story, it could be much more fun to be imaginative and create your own historical figures. You could instead use genuine ones as secondary characters. In the end there are no set rules. It’s up to you.