I recommend ignoring nominal bike sizes as quoted by manufacturers. You have to obtain the frame dimensions, and then ride it.
There is one critical measurement on a bike, and that is the length of the top tube - measured horizontally - center to center. Also referred to as effective top tube (ETT). Other bike dimensions can be changed by swapping parts, but not the inherent frame size, as measured by the ETT.
For someone around 5'10", my first rough estimate is that you need a ETT of somewhere between 55 and 57cm.
The stem length and rise comes next. For an averaged size road frame, stem lengths in the 90-110mm range make sense. If you have to install something outside of that range, then you've picked the wrong bike.
you do look cramped on the Surley. But you are running a super-short stem and a zero-setback post. You can stretch the bike out somewhat by swapping these parts out.