An rp2040 compile seems to include printf() and related features. (in the Arduino core, it seems to use a printf() that is inherited from MBed. In Earle's core, it looks like it's using the RPi SDK implementation.)
MBed, in fact, seems to be pretty full of error messages sent out with printf(), so using it doesn't even increase sketch size!
However, I can't figure out where such printing GOES. It doesn't show up on the USB port (the most likely candidate?) It doesn't seem to go to either of the serial ports, either. I'm not familiar enough with either the SDK or MBed to know whether it needs some sort of initialization, or whether you need to somehow "connected" stdout to a particular place, or what. (I'm not sure whether the SDK implementation even allows run-time selection of where stdout goes - the documentation makes it sound like a compile-time option only.)
On a somewhat related note, it looks like the Arduino MBed implementation initializes and enables UART0 whether you use it or not - upload the BLINK example, and GP0 will go to a high output...