The term you want is “cross compile”. I’ve developed simple programs for the Pi on Windows and it’s simple enough to produce a static binary (using Rust, anyway). When extra dependencies come in it’s better to develop on the same OS, but targeting different architectures is the easy bit.