USB-PD only uses two wires (GND and VBUS), but the standard has the whole section (4.4 in 'USB_PD_R2_0 V1.0 - 20140807.pdf') which describes how the cable detection is implemented. In short, regular USB-A to USB-B cables need to have the special mechanical mark to be considered for >5V/>1.5A, while micro-usb send special signal on "ID" pin, and determines capabilities from that.
In theory, if you do not use special PD cable, then the devices will silently limit the maximum power to pre-PD levels, and all will be safe (at most 5V, 1.5A current).
In practice, I bet there will be manufacturers which produce very cheap cables which still claim to support maximum power, so we might still read about cheap cables catching fire.
I am by no means an expert in this field (there is a lot going to consider), but...
Are USB/DVI/Ethernet cables a trivially easier solution for tens of cm?
USB, DVI, and Ethernet are all very different, so it's difficult to generalize, but I would say "yes, somewhat". Maybe not for 10-30 cm, but 50 cm+ is definitely getting up there. DVI is definitely the most sensitive; USB 2.0 can run long distances across horrible links, 1G Ethernet uses PAM-5 and is consequently very low bandwidth, but DVI might be unhappy. It might be worth clarifying what specific data rates you are enquiring about.
Intuitively shielding of a cable against EMI and cross-talk seems easier than achieving the same performance with a 4-layer PCB.
Sort of. A cable with a foil shield and drain wire does a pretty good job of protecting the cable from external sources of interference, and proper cable design (twisted pairs with different twist rates) does much to reduce inter-pair crosstalk. When you run traces a long distance on a PCB, they are often quite close to significant sources of noise: planes, power supplies, other high speed digital signals, and due to the geometry of a PCB it can be difficult to protect them. However, you can also embed traces between clean planes, which can result in lanes that perform very well, assuming you have a good stackup.
But then skew control seems easier with PCBs than with twisted pairs.
Yes, skew control is easier, but most high speed protocols design for "consumer-grade" cables are very tolerant of inter-pair skew, although they may be less tolerant of intra-pair skew, the latter of which is dealt with by careful cable design. With USB 2.0 and USB 3.0 SS pairs, there is only one lane, so inter-pair skew doesn't exist. On multilane protocols, there is typically a mechanism by which the receiver can (within limits) compensate for inter-pair skew by "slipping bits" until the lanes are aligned (that is, the receiver looks for synchronization patterns and adjusts a series of single-bit delays to align all the lanes).
For 40cm paths, it depends a great deal on the data rate and how capable your receiver is (i.e. what kind of equalization do you have and how much can you apply?). The loss in FR4 is somewhat linear between 2 and 5 Gbps, so it's typically a matter of doing the maths and figuring out how screwed you are. Simulation tools like Hyperlynx can be very valuable for understanding how traces are effected by PCB structures, connectors, termination, etc.
There are certainly products that aim to fill this gap: Samtec Flyover cable stuff comes to mind, which allows you to route stupid fast signals very long distances, board-to-board (-7 dB insertion loss along 1m @ 8 GHz for example).
If you're really just trying to route USB/DVI/Ethernet along 40 cm of PCB, it might be more appropriate to ask: Why and is it really necessary?
Best Answer
That's really not the right question since the power (hopefully) isn't consumed in the cable. When choosing a cable you need to be mindful of:
So a better question would be:
Figure 1. Hybrid power and data cables for servo applications. Source: MacRAE'S BLUE BOOK.
Depending on the size of your project it may be worth searching out suitable quantities of hybrid servo cable. Lapp, for example, do a wide variety but you may have difficulty buying in small quantities.