> I suppose in principle the RPi Pico could self-host its own OS and devel environment. 520 KB of RAM in the old days was plenty to fit an OS and compiler.
With two cheap PSRAM chips and a bit of trickery, you can upgrade that to 32(.5) MB, which is certainly enough to run a small OS.
In principle you can add even more memory with bank switching, but 32 MB is the limit for a flat address space.