It's been awhile since I've been on an X. I was more concerned about attaching a backing plate to his boat if carpeting was on the sides. I still think there is a better idea than removing the carpeting. I'm tossing this around in my head.
Make a template of the shape of the rear side of the galley (that which parallels the port side of the boat.) Have a Plexiglas person then make a piece of black smoked Plexiglas about 1/2" thick, two feet tall and wide enough to wrap about two inches forward on each side of the galley. The pleximan will be able to bend the plexi to match the curve of the galley (template made)for a perfect fit. Attach this to the the side of the galley which is next to the port side of the boat. The wrapped around area would give stability and strength to the structure. This smoked plexi would then be the backing plate to attach anything you wish. Black is a neutral color, so it will not clash with the aesthetics of the boat ( sorry, but I do interior design), and the dark color will cover the cracks that older plexiglass can develop. Anything you attach to the plexi will roll along with the galley instead of being permanently attached to the side of the boat.
Isn't there a height limit if you attach to the galley and still want it to slide back into the aft berth? To me it seems much simpler to hang some rails from the upper liner flush to the carpet and mount to those. No messing with carpet, epoxy, etc. Easy to remove and change. Let's you use the entire wall height. If the lower part of the upper liner is not thick enough you could easily add backing behind it.
It may depend on how you use the galley. I know if I had an M we would always have it locked in the forward position. Our galley get's lots of use as well as the aft berth.
In my line of business I hang many items from many different surfaces. I would not trust the liner.
The reason I said two feet (It was a guesstimate) is because that allows enough surface to bolt onto the rear of the galley and leaves enough above to mount whatever you wish. I think it would not only function well, but also look great. I am now seriously thinking of doing this on Nice Aft. If I do, I will post either my success or failure.