* ffmpeg does that for WavPack, but not for FLAC. Precisely why I don't know, but there was no 32-bit way to do it when there was no 32-bit FLAC support.
When ffmpeg uses 32-bit for internal processing then flac codec by itself overwrites "bits_per_raw_sample" to 24. You have to use:
-strict experimental
to stop it from doing that. With that you can produce 32-bit flacs. You can then also use:
-bits_per_raw_sample 24
yourself to overwrite it back to 24 
(see libavcodec/flacenc.c)
* For 8 bits, the situation is the other way around: ffmpeg creates 8-bit WavPack, as should - but 16 bit FLAC.
That's because wavpack codec has support for all ffmpeg internal datatypes while flac only has support for 16 and 32-bit ones.
In libavcodec/wavpackenc.c:
const FFCodec ff_wavpack_encoder = {
...
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
In libavcodec/flacenc.c:
const FFCodec ff_flac_encoder = {
...
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_NONE },
Merged topics, removed unnecessary reference to other topic.