The '142mm' is indeed the distance across the hub mounting faces but for all intents and purposes, the true spacing is 135mm. The ends of the hub axle engage pockets in the frame that are 3.5mm deep on both sides (142 - 7 = 135).
For hubs, you need to understand that MTB 11 speed systems for the most part still use the same 8/9/10 speed freehub at roughly 35mm long. The eleventh cog overhangs the rear of the freehub but due to its high tooth count does not interfere with the receding spokes. Standard road cassettes use much smaller eleventh cogs and require the longer ~37mm freehub. So long as you pick a hub that a. matches your rotor choice and b. matches your cassette choice you are good to go.
Chainline is slightly affected by the 135mm effective spacing (2.5mm). In practice, it won't make a difference for most because it is rare to find a road disc frame with ultrashort chainstays.
The rear derailleur hanger should only play into what type of thru axle you need. The two most common systems are where the hanger itself is threaded (Syntace) or where it uses a replaceable nut (Shimano e-thru).