the loss of quality from transcoding lossy to lossy is usually a lot worse than the difference in quality between codecs and bitrates (within reason).
ffmpeg and a makefile with a pattern rule is pretty reasonable; (substutite any make-replacement if you prefer). If you are doing AAC, make sure you use the Fraunhofer FDK AAC not the builtin one (the builtin one used to be terrible, but is now somewhere between "okay" and "pretty good" but the FDK is still considered better last I checked, and your distro may not have an up-to-date ffmpeg).
ffmpeg is pretty good about preserving metadata.
If you want ID3v1 tags for MP3 (only needed for older players), then pass -write_id3v1; there's little downside to putting the id3v1 tag on there as it's quite small.
Links for basic ffmpeg encoding; it shows with .wav input but ffmpeg can read flac just fine and should preserve tags: 1,2
For Ogg output, oggenc can read flac directly and preserve tags, so I've never tried using ffmpeg.
I however, ripped my CD collection to a single flac per disc plus a TOC, and abcde will automate that, including a musicbrainz or CDDB lookup for tagging.