In a large pan, heat the olive oil until shimmering add then butter and melt. Add the onions and cook over moderately high heat, stirring occasionally, until golden brown, about 15/20 minutes.
Tie the bay leaves and rosemary and thyme together with kitchen twine. Add the herb bundle to the onions and cook over low heat, stirring a few times, until fragrant, about 3 minutes. Sprinkle the sugar over the onions and cook, without stirring, until the sugar melts, about 5 minutes. Increase the heat to high and cook, without stirring, until an amber-brown caramel forms, about 6 minutes. Stir in the balsamic vinegar and simmer over low heat, stirring a few times, until the jam is thick, about 5 minutes. Discard the herb bundle. Season the jam with salt and pepper and let it cool to warm.
The caramelized onion jam can be refrigerated for up to 5 days. Serve warm or at room temperature.