Getting an STD from a bar of soap that is shared with other people is possible but there is a very small chance that you would get an STD from sharing a bar of soap.
However I still do not like sharing the same bar of soap with even family because it's just dirty although I know people had to do the same thing years ago when they were poor and if you're poor and cannot afford much soap then you may need to share the same bar of soap.
And if you do need to share the same bar of soap with family then there's nothing wrong with it.
However if you can afford more soap then give every family member each a bar of soap to use instead of sharing it.
But with antibacterial soap the STD will likely not be able to survive long on the bar of soap even if it were transmitted to it.