I don't think undigested pills necessarily means anything bad is going on, other than your food is passing thru the digestive tract too quickly and thus your diarrhea, or the fact that there's not the usual amout of digestive enzymes in your system, so therefore the pills are not getting absorbed like they should. One thing you could do is drink an entire glass of water with the pills when you take them, it'll help digest them earlier. Also, I have read a lot about people who do not have their gallbladders, and the kinds of diets some need to follow to help their digestion do better, you could google that stuff on the internet, maybe eating a certain way will help that diarrhea of yours.
Also, I forgot to mention, lots of people have trouble with digesting pills, usually when they get older, but anyhow, you could inquire if there is a liquid form of some of the drugs you take, so you'll be sure to get the benefit you're supposed to have.