For what it's worth, there is a UFP flag (maybe UN, but it's a darker blue) between the two Union Jacks. All government arguments are hypothetical, so putting them aside, the Union Jack may still be used for decoration or as a symbol of a traditional sub-national or regional union. If Scotty can wear a kilt, then I think Brits could still fly a Union Jack.
Also, given the attitude some Brits had towards the Common Market and now have towards the EU, it's quite possible in Trek's time the UK is the last holdout sovereign nation on a united Earth. They probably even still use the pound.