Often used in relation to a business transaction which is one-sided.
While uncommon this idiom can be used in a literal sense and would generally refer to not only the act of being on the receiving side but also of a penetrative act that is disliked or not enjoyable (e.g. anal sex, double penetration..)
"I sold my truck for $2K to some idiot."
"Oh man, that shitbox? He was definitely on the wrong end of the shaft on that one."
"James and I DP'd this chick last night.. man, was she on the wrong end of the shaft."