Assuming you don't intend to keep the iMovie library on the internal drive, it should be fine.
Otherwise, 256GB will get sucked up in no time by iMovie.
If you use an external drive for the iMovie library then 256GB may still be a bit tight, but not as much.
I would suggest bumping up the RAM to 24GB though.
With that sad if you do go for a Mac Mini, as mentioned you will need to consider a display to go with it (unless you already have one) as unlike the iMac, the Mac Mini does not have a built-in display.
You would still likely be well below the cost of a similarly specced iMac though, also you would be getting the newer CPU instead of the older one from 2 years ago on the iMac which incidentally might be getting updated at Apple's October event, no confirmation yet on that, so take it with a grain of salt.