I hadn't seen SafeString before, I will have to consider it next time I do something String intensive.
I can confirm that both ARDUINO_ARCH_MBED_RP2040 and ARDUINO_ARCH_RP2040 works for the Pico. I haven't got one of the new Arduino Nano RP2040 boards so I can't test if it works on those or whether there is a way to differentiate between these boards.
Do you know in which file these constants are defined?
The Arduino one I got from looking the verbose compile output. Earl provided the other one (I could not see it in the compile line)
You can just try a compile without a board to see that they work.