IEEE 754 2019 6.3 says:
When either an input or result is a NaN, this standard does not interpret the sign of a NaN. However, operations on bit strings—copy, negate, abs, copySign—specify the sign bit of a NaN result, sometimes based upon the sign bit of a NaN operand. The logical predicates totalOrder and isSignMinus are also affected by the sign bit of a NaN operand. For all other operations, this standard does not specify the sign bit of a NaN result, even when there is only one input NaN, or when the NaN is produced from an invalid operation…
The 2008 version has much the same wording, but the 1985 version says:
This standard does not interpret the sign of an NaN. Otherwise, the sign of a product or quotient is the exclusive or of the operands’ signs; the sign of a sum, or of a difference x − y regarded as a sum x + (−y), differs from at most one of the addends signs, and the sign of the result of the round floating-point number to integral value operation is the sign of the operand. These rules shall apply even when operands or results are zero or infinite…
Thus, from the 1985 wording, one might expect the sign bit of a NaN produced from +0/−0 to be set, as this sign bit is produced, not interpreted, by the operation. But the committee apparently clarified or changed this so that “this standard does not specify the sign bit of a NaN result” except for the listed operations.
For x86 and x86-64, Intel 64 and IA-32 Architectures Software Developer’s Manual, December 2017, shows that the “QNaN floating-point indefinite” produced for invalid operations (Table 8-10) has its sign bit set (Table 4-3).