Google is committed to a minimum of 8 years of security updates. We don't have currently have official support for other OS's, but there is an active community of people bringing other OS's to Chromebooks.
Google provides specific support dates on its Pixel and Chromebook devices. For instance, under "About ChromeOS", mine says, "This device will get automatic software and security updates until 2027."
In case of doubt you can always replace the OS with whatever Linux distribution you choose, which only leaves closed-source driver/fw blobs - but that problem is shared with every other general-purpose computer these days.