Checking if field is set before comparing with meta_query in query_posts?

I know how to do that in pure SQL but I can’t get WP_Query to nest conditions in the way required.

If it is acceptable, the easiest way to make this work would be to assign an arbitrary far future end date when the data is saved to the database. Something like strtotime("2038-01-01").

That is a bit of a hack but Core functions should work and you wouldn’t need to write your own SQL. Using a fixed date like that means that you can easily find and alter the expiration date if 2038 comes around and you find you need to, or you could remove the date if WP_Query gets patched to handle the kind of query logic you need.