```python
def cheapest_pass_plan(trip_days: list, passes: list) -> dict:
    if not trip_days or not passes:
        return {'total': 0, 'purchases': []}

    for day in trip_days:
        if not isinstance(day, int) or day <= 0:
            raise ValueError("Trip days must be positive integers.")

    if not all(trip_days[i] < trip_days[i + 1] for i in range(len(trip_days) - 1)):
        raise ValueError("Trip days must be strictly increasing.")

    for pass_ in passes:
        if 'span' not in pass_ or 'cost' not in pass_:
            raise ValueError("Passes must have both 'span' and 'cost'.")
        if not isinstance(pass_['span'], int) or pass_['span'] <= 0:
            raise ValueError("Pass span must be a positive integer.")
        if not isinstance(pass_['cost'], int) or pass_['cost'] < 0:
            raise ValueError("Pass cost must be a non-negative integer.")

    n = len(trip_days)
    dp = [float('inf')] * (n + 1)
    dp[0] = 0
    purchase_history = [[] for _ in range(n + 1)]

    for i in range(1, n + 1):
        for pass_ in passes:
            if trip_days[i - 1] >= pass_['span']:
                cost = dp[i - pass_['span']] + pass_['cost']
                if cost < dp[i]:
                    dp[i] = cost
                    purchase_history[i].extend(purchase_history[i - pass_['span']])
                    purchase_history[i].append([trip_days[i - 1] - pass_['span'] + 1, pass_['span']])

    return {'total': dp[n], 'purchases': sorted(purchase_history[n])}
```