warning: see end
hm. A "does it exist" question is very likely to be answered with "yes" anyways. You can buy custom packaging services, and I'm sure someone did combine a leadframe with fewer pins with a QFP-32-sized packaging mold. It's hard to stop engineers, especially when they have a customer with unreasonably deep pockets for custom solutions and a high cost for a board redesign (/me waves to the aerospace and especially defense designers), or when their frequency ranges demand very custom packaging anyways (side-eyes the Keysights of this world). That's probably the reason your RF filter had a pretty special package.
Let's rephrase this
Were QFP-28, QFP-24 or QFP-20 ever used to package electronics?
as
Were (or are) QFP-28, QFP-24 or QFP-20 used in mass-market industrially-rated devices whose functionality doesn't demand a non-standard package?
That rules out things like this specimen:

… And then things get really sparse.
For something that's a bus driver, multiple-devices-per-package amplifier IC, or similar "has an input and an output side" thing, for 28 pins (and fewer) and below, the bilinear arrangement of (T)(S)SOP-28 is actually kind of advantageous for layout. (you still find these packages on new audio power amplifier ICs, for example, and on LED matrix drivers, and on parallel data bus drivers, and on polyphase switching power supply ICs, and the like.)
That would leave you with mostly digital logic devices like PLDs, GALs, and microcontrollers. And for these, market forces have mostly divided things into "less than 12 pads" and "more than 28 pads", as far as I can tell – my guess here is that if you're, say, ST, and you make a new microcontroller die, then you don't produce a different die for every different number-of-pins part in a MCU family; you make one die and connect it differently. But then that die needs to support the "largest pincount" in the whole family. Selling a device with fewer IOs than possible at the same production cost has little commercial utility – unless you can reduce device package size for people who care about SWAP. (absolutely hating hand-soldering fine-pitched TSSOP and the like: My guess is furthermore that the yield (or the defect rate) on no-lead packages in a reflow process is significantly better than for QFP of the same pitch.)
Now, these people wouldn't care about QFP at all; they've been in the QFN camp for decades, and have or are moving to WLCSP / BGA parts now, because most low-to-medium-cost board production processes allow them do so, so why waste space on pins that serve no functionality that much finer structures on the board itself could do, for free?
For higher-speed digital devices on multilayer boards, having to bring the contacts to the edge of a package is a complication and potentially a bandwidth limitation, and thus you'd want to have the contacts all across the bottom of the device instead of just the edges, too.
Together with these market and practical consideration, a bit of empirical evidence: When you peruse the filter box on the IC category on a part meta search engine like octopart.com, you'll only find RF-specialized "special" packages that are quadrilaterally flat-pinned and have less than 32 pins.
So, I'll go with a negative:
No, there aren't and weren't any non-specialized-package devices in these packages.
Edit based on counterexample to this answer
Ha! Clearly my answer that it doesn't exist is wrong; thankful for Polynomial to prove me wrong :) . So, not expecting any upvotes on this answer, and edited in warnings to not mislead a casual reader; still think it's worth having been written the way it is, and thus will leave it here.