@ChristianG You might start by reading the 'free games' thread: https://retropie.org.uk/forum/topic/9500/looking-for-free-legal-games
The homebrew ROMs thread is also relevant: https://retropie.org.uk/forum/topic/8792/big-rom-hacks-homebrew-thread
(Assuming you're running a Linux distribution which allows commercial sale.) You can preload a title when you find 1) a ROM that is public domain or licensed for commercial redistribution and 2) an emulator core that is GPL or otherwise licensed to allow commercial use.
This will not be a cornucopia of emulators and ROMs, but it might be enough to be useful in a product that is legitimately sold.
Edit: If you didn't pick up on this from earlier posts, you should not start by using the prebuilt RetroPie image. You should start by using the RetroPie setup script on a commercial use-friendly Linux distro.
Edit 2: Also remember to check on the license of the frontend theme that you use.