I can't really recommend a specific machine for you, as what you choose really depends on what your priorities are. But some more general suggestions...
Looking at the PFSense requirements again, they seem to have relaxed the requirement for AES-NI, although it is still strongly recommended So you can now install PFSense on a CPU without AES-NI support. That said, they did make it a requirement at one point, so I suspect they might bring the requirement back in the future.
OPNSense is the same - not required but strongly recommended. It's less likely OPNSense will force AES-NI, but it is possible.
So that Q9400 machine will almost certainly work, but you might not get great performance and it will consume quite a lot of electricity. But out of all th e
Don't forget you will likely want more than one NIC in the machine - one to connect to the WAN side of the network and the other for LAN. So as a bare minimum you need a PCI-E slot for a second network card. On that topic, an Intel NIC is recommended over Broadcom or Realtek due to better driver support in PFSense. Often you can find these branded as Dell or HP NICs since they're often removed from those brand servers.
My general recommendation is to look for old business machines - businesses are often clearing out old computers. Dell Optiplex and HP ProDesk machines are often fairly easy to find second hand.
This video does a great job of outlining some of these details
The ASA5505 is not a bad machine, but it's also getting very old nowadays being released in 2006. They only have 10/100 ethernet ports, so you'll never be able to do speeds over 100mbps (whether that's an issue for you, I don't know). You also won't officially be able to update to the latest firmware without a Cisco support contract. I'm not aware of a way to install any other OS on an ASA. Remember also the ASA is a firewall, not a router. It can do many of the tasks of a router, but that's not what it was built for.
My other recommendation for cheap routers (depending if they are available in your country) is MikroTik. The MikroTik HEX is a surprisingly powerful, compact and relatively cheap router with a very customisable and feature rich OS:
MikroTik. The HEX Lite and HEX S are also good options.