When no party has a majority, a group of parties may form a majority coalition to form a government together. Under such circumstances, the opposition never has a majority, but Her Majesty's Most Loyal Opposition nevertheless serves as a government-in-waiting. If two or more parties decide before the elections that they wish to form a coalition after the election, can they form Her Majesty's Most Loyal Opposition together and share the frontbench between different opposition parties?
It's the UK, given that this is governed almost entirely by precedent, and precedent is simply what people do long enough, then of course they can.
More seriously, the second largest UK Party, the Labour Party already run in electoral pact with the Cooperative Party, and have done since 1927, with some MPs elected on the joint ticket having acted as members of the shadow cabinet. Further the modern Liberal Democrats were previously the SDP-Liberal Democrat Alliance, which contested the 1983 and 1987 elections in coalition with leaders David Owen (SDP) and David Steel (Liberal Party), and at one point appeared to be on course to break the then current Conservative-Labour Party duopoly. Since it originally intended to govern in coalition, it would almost certainly have formed an opposition coalition.