This application has "transformers" written all over it. A big factor in AC vs DC power (Tesla vs Edison) being the ability to haul it long distances. And this right here is where that comes into play.
In every single scenario, your barn needs its own earth grounding system.
Plan 1: Conventional sub-panel (as discussed elsewhere)
Wire cost: $4000. (about a 25% margin over the best prices I can find).
That plan only makes sense if money is no object and the goal is to stay "DIY friendly". But it still won't be, because of the miserable pulls with huge wire (unless you upsize conduit to about 4", not least, because the bends are wider radius.) The only benefit to all this is avoiding transformers. Since this scenario is well covered by other answers, I'll won't elaborate.
Plan 2: Use a transformer to make the barn a main panel.
Wire cost: $2000. Transformer cost: $900
You only need 2 of the huge 350kcmil wires. You feed them with 240V and they go to the primary side of a 25kva transformer. The transformer removes the need to run a "ground" and "neutral" wire (but the primary and secondary sides are different). Your barn is now a main panel. L1, neutral and L2 come off the secondary of the transformer. The transformer and the barn panel are grounded to the barn's grounding system.
You may be able to reduce the size of the wires somewhat, because the transformer has "taps" to compensate for voltage drop.
Plan 3: Also pump up the voltage for the long run.
Wire cost: $300. Really. Transformer cost: $1800
This takes two 4-AWG (maybe 6) AL wires. Instead of one 25KVA transformer, you get two -- with a higher voltage primary, within the rating of the cable you plan to run. So if the cable rating is 600V (most likely), get 480, 575 or 600V transformers (those last two are a thing in Canada). These voltages are serious, but still within the range of common panels and wire. Call an electrician for the final review, megging and hookup of the higher voltage stuff.
You backfeed the secondary of one transformer with 240V from your panel. The primary feeds your long conduit run to the other transformer's primary, which knocks it down to 240V on the secondary. As above, the barn panel is a main panel which gets L1, neutral and L2 from its transformer, and ground from the barn's grounding system.
Plan 4: Tie into the high voltage supply
Wire and transformer cost: ???? depending on voltage rating and delivery.
The power company transports power across farmland at a much higher voltage like 600V or 2400V, and then have a transformer at your house to knock it down to 240/120V. I imagine you've already talked to the power company and asked them the cost of wheeling their high-voltage to your barn and provisioning their transformer and meter, and didn't care for the answer.
I am saying, see if it is feasible to buy their power on the high side of their transformer, and take responsibility for the pole line, underground, transformer etc. It's sorta like "rent the cable modem or buy one". Used transformers can be had. Of course touching their high-voltage is electrician territory, but you can do all the grunt work, so he megs a few things out, connects 2 wires and throws the switch. There's no reason to pay an electrician to trench conduit or punch holes in walls.