You know the KJV is just one translation and not a particularly good one. We are definitely talking about slaves as far as the foreigners are concerned.
Let's look at the Hebrew and the context, then.
There is only one Hebrew word for someone who is serving someone else (ebed). It's contrasted with hired worker in Lev. 25:40. This suggests that if there was one word that would fit all instances it would be servant, rather than slave. One form of this word, 'abed', occurs 6 times. Two of these are in Genesis 44 where Joseph tells his brothers that the one who is found to have Joseph's cup will become his servant. So the context here is that Benjamin would be put to work because he had done something wrong. Most people would agree that this sort of forced service in itself is not morally wrong, but right. Compare with forcing a criminal to do community service.
In 1 Kings 9:22, 'abed' is again used when Solomon imposes forced service onto the remaining Amorites, Hittites, Perizzites, Hivites and Jebusites who were still living in Israel. In this instance again, the word is used of people descended from the corrupt peoples of Canaan.
In Proverbs 29:19 it is used for a servant who won't be corrected by words alone. Someone might say this is morally wrong, but four verses previously it mentions disciplining a child by physical means, implying that it is sometimes appropriate to discipline someone physically if they are doing something wrong.
The context in Leviticus 25:39-46 is that it's contrasting people who are bought temporarily (fellow Israelites) with people who are bought as permanent property (only foreigners). Note that it's about purchasing a servant. It's not kidnapping a person in order to force them to work or sell them, which was a capital offence (Ex 21:16). It is assumed, since this is written for legal purposes, that because the buyer is investing his wealth, for that reason he will treat the servant well. (This is the implied meaning of Exodus 21:21 "for he is his money"; likewise a girl who is raped in the countryside is assumed to have cried for help, see Dt 22:27 "For he found her in the field,
and the betrothed damsel cried, and there was none to save her".)
It's worth noting also that in Lev 25:42 Israelite servants are referred to as Yahweh's servants, implying that foreign ones are not. Could this mean that for a foreigner to become the servant of an Israelite would indirectly make him Yahweh's servant?
Also, you need to consider why the women had no husbands.
Again, this was a case of punishment for wrongdoing (by the Midianites), and cannot be dismissed as rape or whatever.