Preheat the oven to 200°C. Put a 24cm deep ovenproof frying pan with a lid over a medium-low heat. Make sure you have a board or plate that will fit tightly over the pan.
Cook the onions: peel and halve the onions. Add the oil, dairy-free butter and the sage leaves to the hot pan. After a couple of minutes, pour off a little of the sage butter into a small bowl and set the crispy sage leaves aside on a sheet of kitchen paper. Add the onion halves to the pan, cut-sides down. Season generously with salt and pepper, sprinkle the sugar over the onions and drizzle over one tablespoon of the balsamic vinegar. Turn down the heat, cover the pan and cook for 15 minutes. Finely grate the cheddar.
Build the tart: unroll the pastry and cut it in half widthways to make fitting the pastry into the pan easier. Take the lid off the pan and scatter half the cheese over the onions. Drape the two pieces of pastry over the top to cover the onions (they will overlap in the middle)
Carefully tuck the pastry in around the onions, being careful not to burn your fingers on the side of the pan. Prick the pastry all over with a fork and brush the top with the reserved sage butter. Transfer the pan to the hot oven to bake for 25 minutes, until golden brown and puffed up.
Serve: remove the pan from the oven (the handle will be hot!). Lay the board or plate over the pan then carefully flip it over to tip out the tart. Drizzle over the remaining balsamic vinegar, reserved cheese and the fried sage leaves. Slice and serve with a simple green salad.