What are you willing to spend? How much work are you willing to do? How much does finished appearance mean to you? I have a couple ideas. My first one, I think you won't want to do. Now all of them mean you're going to be digging a pit that size maybe 20 or 30cm deep. I dug out an area and lined it with cinder blocks stood on end. Got the job done. But I did it that way because I had the blocks. Bet you don't.
Next option, and probably the better looking one, is to get a bunch of pressure treated 4x4s. You dig out your trench, and line it with the 4x4s, maybe 2-3 beneath ground level, and 2-3 above ground level. You'd spike them together somehow, to keep it all solid. That looks like this, only on a smaller scale. And you don't have to use the 6x6s, you can save money and labor using 4x4s instead.
Then you can get PT 2x4s and use them as uprights to support your chicken-wire fence. But before putting up that fence, I'd be tempted to go with the garden for a year and see if you really had enough animals foraging to make the fence worth your time and effort.
Cheaper, probably less work, but not as attractive, you could do something like this instead.
Now with this, instead of using 4x4s, you can use 2x6s or 2x8s. The picture shows using 4x4s for uprights. But as you are not building a retaining wall, you aren't dealing with the same weight pushing against your boards, and can build lighter and cheaper. So instead of using the 4x4s, use a 2x4, and you can just continue those upwards to be the uprights supporting your chicken-wire fence.
After that, if your soil is no good, get a company, there will be several in your area, to deliver a truckload of good dirt. Or go to a garden center and buy many, many, bags of good dirt. Mix is with peat moss when you fill it in. You get around the problem of it compacting down too much by churning it with a shovel every year when planting. But you'll probably still be adding to it somewhat every year.