I'm not familiar with FreeNAS, but I see it's advantages mostly in it's gui and zfs support. So if you just need a few smb shares and don't need to constantly configure it, I'd go with Ubuntu.
If you have multiple disks that you can use in raid, then zfs might be a good idea for it's check summing capabilities and correction of bitrot.
But it's also possible to install zfs on Ubuntu, though you'd have to use the cli instead of FreeNAS gui. I've recently setup a zfs raid 1 for the first time and the cli is simple to understand and the docs are great.
So I'd stay with Ubuntu and just use samba directly.