Would a Raspberry Pi with linux be more secure?

If you tested the RPi 5 and decided it’s good enough for you, then yes it sounds like a decent mini desktop option if you’re looking to save on space as well as energy and hardware cost.

If you’re concerned about potential backdoors in AMD/Intel CPUs, you should be concerned about all proprietary hardware as well as who manufactures them and under which jurisdiction. I don’t see any reason to believe ARM/Broadcom would be any better in that regard, they seem to have all the same underlying issues that allows for a potential backdoor.

The architecture alone is only one small part of the equation. An open architecture is required for us to have open hardware which itself is required to build a foundation of transparent hardware, but using an open architecture doesn’t make the hardware or its firmware open source. Most if not all RISC-V CPUs I’ve seen are still proprietary, though maybe it is to varying degrees. Even with the “dream CPU”, you’d still have to worry about a lot of the other proprietary hardware you’re using.