```python
import re


def parse_option(segment: str) -> list:
    key, eq, raw = segment.partition("=")
    if not eq or not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key):
        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 not text:
        return []

    pairs = []
    current_segment = ""
    quoted = False
    key_set = set()

    for char in text:
        if char == '"':
            if quoted:
                current_segment += char
                if len(current_segment) > 2 and current_segment.endswith('"'):
                    # Close the quote
                    raw_value = current_segment[1:-1]
                    key, eq, _ = current_segment.partition("=")
                    if eq and re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key):
                        if key in key_set:
                            raise ValueError("repeated key: " + key)
                        pairs.append(parse_option(current_segment))
                        current_segment = ""
                        key_set.add(key)
                    else:
                        raise ValueError("malformed option segment: " + current_segment)
                quoted = False
            else:
                quoted = True
        elif char == ';':
            if not quoted:
                # End of a segment
                if current_segment:
                    key, eq, _ = current_segment.partition("=")
                    if eq and re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key):
                        if key in key_set:
                            raise ValueError("repeated key: " + key)
                        pairs.append(parse_option(current_segment))
                        current_segment = ""
                        key_set.add(key)
                    else:
                        raise ValueError("malformed option segment: " + current_segment)
                current_segment = ""
        else:
            current_segment += char

    if current_segment:
        key, eq, _ = current_segment.partition("=")
        if eq and re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key):
            if key in key_set:
                raise ValueError("repeated key: " + key)
            pairs.append(parse_option(current_segment))
        else:
            raise ValueError("malformed option segment: " + current_segment)

    return pairs
```