You can sell flash carts, but don't advertise them as a way to steal games, and definately don't preload them with illegal roms or anything dumb like that.
It should be ok to preload them with moonshell, ds organizer, etc. DSDoom - as long as you only put the shareware version, and not an illegal copy of full version (don't listen to the idiots who cry 'abandonware!', you can still buy doom on id.com's website)