It's definitely not just for JS web apps anymore—you can run Rust, Python, and even standard Docker containers now. Plus, things like D1(SQL) and R2(Storage) give you the entire backend stack ready-made.
But you're completely right that it doesn't replace a raw VM. Cloudflare's goal is to abstract away the infrastructure so you don't have to manage a Linux server just to host an API or SaaS. But if you actually need OS-level access, background daemons, or to run legacy code, you absolutely still need EC2 or a traditional VPS.