Since sounds like you are using just a single connection to the sub, all you need is a single cable from each receiver to the switch and a single cable from the switch to the sub.
Yellow "out" to the sub.
Yellow #1 from one receiver.
Yellow #2 from the other receiver.
(Yes, I know, the yellow says video but it matters not in this case and slightly easier than keeping track of left or right on the switch connections.)
From your HT receiver it's a single sub out anyway, no worries. Plug that to Yellow #1.
From the Pioneer I, personally, would not use just one channel but it certainly won't hurt anything to try it that way from the right pre out to Yellow #2.
If the right speaker no longer works when the cable is plugged into the right pre out, you will need to add a Y splitter to bridge the pre out/main in, and provide a connection to the switch. It would be a Y cable like this style.
The male connections would go to right pre out and right main in. The female end would connect to the switch Yellow #2.