Actually many pharmaceuticals are removed or degraded by sewage treatment plants but the problem is that they can have environmental effects in ng/L concentrations. This means that even if sewage treatment works removes 90% of the substance, enough is still released to have effects. The effects themselves also tend to be quite subtle - behavioural as in this study rather than more classical measures of ecotoxicity (death, inhibition of reproduction or growth).
The European Medicines Agency (like the FDA) requires an ecotoxicological assessment of all medicines, however, unlike other chemicals (pesticides, industrial chemicals), this environmental risk assessment does not result in any actual regulation of the substance even if a risk to the environment is found. This is because it is currently considered that the human benefit of such substances outweighs any concerns for environmental effects.
The effects of some pharmaceutical substances are widely known (eg ethinyl oestradiol in the birth control pill causing intersex in fish) but for many other pharmaceuticals there is still much work to be done to properly assess effects. There is also the issue that organisms in the environment are rarely exposed to a single substance but a complex mixture of different substances, all excerpting different effects in varying degress in different species. Another issue is that risk assessments tend to focus on parent compounds rather than degradation or metabolic products which can sometimes be more ecotoxic than the parent.