```python
import re

def parse_option(segment: str) -> list:
    key, eq, raw = segment.partition("=")
    if not eq or re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key) is None:
        raise ValueError("malformed option segment: " + segment)
    if len(raw) >= 2 and raw.startswith('"') and raw.endswith('"'):
        raw = raw[1:-1]
    return [key, raw]

def scan_pairs(text: str) -> list:
    if not isinstance(text, str):
        raise ValueError("input must be a string")
    if text == "":
        return []

    result = []
    in_quote = False
    current_segment = ""

    for i, char in enumerate(text):
        if char == '"':
            if in_quote:
                if i > 0 and text[i - 1] != '\\':  # Check for escaped quote
                    in_quote = False
                else:
                    current_segment += char
            else:
                in_quote = True
        elif char == ';' and not in_quote:
            if current_segment:
                try:
                    result.append(parse_option(current_segment))
                except ValueError as e:
                    raise ValueError(f"invalid option segment: {current_segment} - {e}")
            current_segment = ""
        else char == '=' and not in_quote:
            if current_segment:
                raise ValueError("invalid option segment: " + current_segment)
            current_segment = ""
        else:
            current_segment += char

    if current_segment:
        try:
            result.append(parse_option(current_segment))
        except ValueError as e:
            raise ValueError(f"invalid option segment: {current_segment} - {e}")

    return result
```