To the OP,
The historical "farm gun" has been something not terribly powerful, (.22lr, .22hornet which I find brass whenever I clean a hedgerow, .32-20, .410 shotgun) simple, (break action, rolling block, bolt) and cheap, (because it was just another tool that was going to be with a farmer getting rained on fixing fence and bouncing around cultivating corn).
I would recommend something that takes a box magazine due to rules about having a "loaded" firearm if that is acceptable. In places where a loaded magazine is a loaded gun, may I suggest something that takes stripper clips.
I carried a 10-22 for years on the fender of the old Ford in a scabbard. Times have changed, I wouldn't want to be caught just leaving it under a jacket anymore. As I've gotten older, I now realize that there may be a time where .22lr just isn't enough. (I know the biggest bear in Canada was taken with a .22lr....shot placement is what counts.) I also got caught with less than 100 rounds when the banic started and I went years without finding resupply.
As a fan of Jeff Cooper, I've chosen the Scout rifle concept.
1. It is one gun capable of taking anything in NA.
2. Light, short, (just like 10-22)
3. Bolt action should be safe from political action for a while.
4. Bolts can be fast (look at "mad minute" videos)
5. Easy to download and reload.
6. Multiple sight systems available on the rifle.
Yes it is a .308win but using a $30 NEW Lee loader, cast lead bullets (buy them cheap, made for 30-30, you don't have to cast) and some Trail Boss powder I load my own subsonic loads for less than .223 and it has very similar report, recoil and trajectory to a .22 while having 165gn vs 40gn of bullet hitting.
Currently steel cased Russian .308 can be under $.50 a round.
The 12ga advice is good. If you are going to shoot a raccoon in a tree or running, a load of shot works great.
It seems like a rimfire and a shotgun are pretty standard tools. Don't spend a dollar to save a dime with conversion kits and interchangeable barrels.