This question evaluates a candidate's ability to implement interval merging algorithms, reason about edge cases such as touching boundaries, empty inputs, and invalid intervals, and perform time and space complexity analysis.

You are given two lists of closed intervals [start, end]. Each list is individually sorted by start and contains non-overlapping intervals. Merge the two lists into a single list representing the union of all intervals, returning a minimal set of non-overlapping intervals sorted by start. Specify how you handle touching boundaries (e.g., [1,3] and [3,5]), empty inputs, and invalid intervals (start > end). State the time and space complexity and outline an O(m + n) two-pointer approach.