Anything you fly from that position can flap against the sail going upwind (in the right conditions).
If it's truly on a flag halyard, you can lower it, if conditions are like that. I recently tied a burgee there directly to the shroud and on some days, I'm not so happy with the sounds. Some day perhaps, I might reconsider and not fly anything, or I might decide I'll do it with a proper flag halyard.
Anything you fly there will be obscured for anyone not seeing your boat side-on from that side. For all-around visibility you'd have to fly a streamer from the mast top

You also won't have the space to fly things set in from the shroud, so the best solution might be if your flag halyard hoisted some rings that slide on the shroud. That way, your flag or burgee can't get itself stuck between flag halyard and shroud.
Now, what flag are you trying to fly up there? If you are trying to fly a flag showing your nationality, it would really go on a flag stock over your transom.