Both phones use the same DAC. The difference in sound comes from software and the headphone port. The Z2 has a nice black background, so its headphone port must be decent. It also has a very nice bass boost in its built in equalizer, which works in any music app and not just the Walkman app. The reason I like the bass boost is because it boosts the lower end more than the higher end bass, so it doesn't bleed into the mids. I don't use the Clear Audio+ option as it just increases the treble but also narrows the soundstage.
The included IEMs are also very decent for bundled earphones. They have a nice flat frequency response but can also give punchy bass when you make them. They have decent instrument separation as well. They could maybe do with a little more clarity, but that's all really. The noise cancelling also works really well.
I've never had the privilege of listening to any Wolfson DACs, but the DAC inside my Z2 sounds quite comparable to the Texas Instruments DAC inside my JDS Labs C5D. It's to do with taste more than anything at this point. Again, the DACs in the M8 and Z2 are the same, so they shouldn't sound too different with software tweaks off. Can you not just try one out in a store anyway?