Real world procedures?

Its normally not a problem to file a IFR flight plan in flight in European airspace, I have done so a couple of times in my career as an instructor when the weather became worse than forecasted.

Its not standard, but it can be done. Depending on the local regulations a flight plan can be submitted in flight 20 min or so before entering or crossing controlled airspace and you’ll be treated like everybody else.