In my experience, Kdenlive and Shotcut are more or less on par with iMovie. Da Vinci Resolve works on all three major OSes and is actively usurping the prosumer market previously held by Premiere and Final Cut Pro. (It even has an advanced, node-based compositing tool for visual effects and motion graphics.) It's not open source, though it's free unless you need some features aimed more at serious commercial stuff.
The free version has h264 and h265, as far as I can tell. I rendered a mp4, h264 video in resolve today. My first time using the software and it was surprisingly capable. (I needed to blur a moving face in a video)
On Mac and Windows, the free version of Resolve supports H.264 and H.265 (using OS-supplied codecs IIRC).
Linux H.264 and H.265 support is Studio-only[1] (presumably because royalties).
If you don't care about any other Studio features, converting to/from an intermediate codec — DNxH[DR], say — on import/export using another tool like FFmpeg seems like a reasonable workaround for most applications.
Since Resolve doesn't support H.264/H.265 passthrough (on any platform), the only generation loss added by this approach will be from DNxH[DR] encoding, which, assuming a sufficiently high bitrate for the intermediate codec, should be minimal.
Note that even Resolve Studio doesn't support AAC audio on Linux[2], so, for many H.264/H.265 projects, you'd end up with pre-/post-conversion steps even if the video codecs were supported.