Wrist and hand pain could be from the saddle being set too far back.
If the M feels better to you ignore the chart. You are right on the cusp between the 2 sizes. The chart can’t be that precise. People are different even if the same height. Leg length and torso length will vary among people that are the same height.