Throughout human history, the concept of slavery has existed in many different ways. But the overall concept is that slaves are like live-in workers that you don't have to provide for. Or at least not fully, you still need to provide the bare minimum of food, water and sleep if they're to actually get stuff done. Slavery in itself can be divided into multiple categories depending on reasons and methodology, though there will often be a combination of these types.
"Legal" slavery, aka chattel slavery, is institutional slavery where a system is in place to better control slaves and slave masters. While it isn't the cleanest system, they'll (usually) at least guarantee their basic human needs when done right. In terms of who becomes a slave under this system, these people will usually be debtors, criminals and those who were captured during a war. But when things like race enter the picture, many of these slaves will mostly consist of a perceived "inferior" race, like what Europe and America did with Africans and what the Egyptians did to the Jews before them. For especially ancient cultures like the Romans, the Chinese and the Greeks, slavery is considered a cornerstone of their culture. Rome wasn't built in a day after all, and who do you think they got to build such structures like the Pyramids, the Collisium and the Great Wall of China?
That last point can also fall under what we'd call forced labour. Doesn't matter where the slave came from or who they are. The moment they're captured, they're branded a slave and put to work. On one hand, depending on how they're caught, it can be seen as a pragmatic act rather than moral one, but on the other hand, the captors will usually be rather brutal in their treatment of their slaves. One example of slavery as a pragmatic act is in the 2012 Quinten Tarantino film Django Unchained, where Django gets sold to Dr. King Schultz for information on a bounty he's after and as an extra gunman to help collect said bounty.
"On one hand, I despise slavery. On the other hand, I need your help. If you're not in a position to refuse, all the better!" - Dr. King Schultz
Now, when it comes to how we perceive slavery in the here and now, almost all decent human beings tend to agree that slavery has no place in civilized society as it goes against the thought that all humans are created equal. While on a biological level this can be up for debate, the reason why we do not think that way anymore is because of a certain dictator that started a war in the 1930's and the movement he inspired. Up until that point, no one really took racial equality seriously until the world saw what happened inside the internment camps as "justification" for a concept like "racial superiority." What the Nazis saw as "ethical cleansing" the rest of the world saw as straight up torture, and we all (understandably) never wanted to see something like that again, and thus, anything associated with the Nazis, outside historical context, is heavily censored and why no sane politician wants to be called fascist or authoritarian.
But back to perception, Japan as a whole, while not perfect, tends to not give a fuck about something like race. That said, when it comes to anime and manga, there usually won't be that much diversity when it comes to humans unless it serves as a big part of their character, but that's usually just because the artist/writer isn't actively thinking about race when it comes to their characters. Also, it can just come down to the fact that unless it's made painfully obvious that someone's a foreigner or a demi-human, a lot of younger looking characters tend to look similar but with subtle changes to make them distinct.
When it comes to how anime and manga perceive slavery, it's a matter of the story's tone that determines how it's perceived. With the Shield Hero and almost every other isekai that came after it trying to replicate its success, slavery's just seen as another part of life to the world, while the MC will, bare minimum, feel uncomfortable at first, only to pick up one or more female slaves because he feels pity for them. To them, it's usually either an act of pragmaticism (remember the quote above) like what Naofumi did or an act of sympathy, to save the beautiful girl from what could've been an incredibly bleak future.
And here, you're probably asking yourself "if they're so disgusted by slavery, why aren't they doing anything to uproot it?" Again, Rome wasn't built in a day, and systematic slavery isn't something you can just get rid of right there and then. Especially if you're an otherworlder who's barely spent a month in an unfamiliar world set in the Middle Ages, OP status or not. Even if you had the cheat skills to do something about it, you'd not only be stepping on the toes of some rather powerful people, but depending on how economically reliant a society is on it, you'll also risk causing financial both financial and literal chaos upon doing so. Unless you REALLY want to go full chaotic evil, most people won't actively do anything about it because they can't.
Those who are in power that benefit from slavery, directly or indirectly, will always be unapologetic or indifferent about it, but when stuff like PR is involved, they will try to put a spin on it to justify what they're doing. For some, they'll take the supremist route when the enslaved is of a different race, while others will claim that the slaves had it coming. In more "positive" depictions, the excuse will usually be something along the lines of them being debtors, fallen nobles, children and/or criminals. But that's if the slave market is a public institution where anyone can buy a slave if they have the dough.
As for instances regarding magic and magic items concerning slavery, well, it's usually called dark/black magic for a reason. And the reason why it isn't regulated better, think about the setting the story's set in. It's much, much harder to keep track of things when your best method of distant communication is a quill, paper and your own two legs. And that's before you factor in stuff like corruption, magic and the possibility that the courier would be mauled by a dire wolf between point
A and point B.