```python
def parse_option(segment: str) -> list:
    """Parse a key=value segment into [key, value]."""
    if not isinstance(segment, str):
        raise ValueError("Input must be a string.")
    
    parts = segment.split('=')
    if len(parts) != 2:
        raise ValueError("Invalid format: missing '=' in segment.")
    
    key = parts[0]
    value = parts[1]
    
    if not key.isidentifier():
        raise ValueError(f"Invalid key '{key}': must be a bare identifier.")
    
    if value.startswith('"') and value.endswith('"'):
        value = value.strip('"')
    else:
        value = value.strip()
    
    return [key, value]

def scan_pairs(text: str) -> list:
    """Scan an options string into a list of key=value pairs."""
    if not isinstance(text, str):
        raise ValueError("Input must be a string.")
    
    if text == "":
        return []
    
    result = []
    current_segment = ""
    in_quotes = False
    
    for char in text:
        if char == '"':
            if in_quotes:
                # End of quoted value
                current_segment += char
                in_quotes = False
            else:
                # Start of quoted value
                current_segment += char
                in_quotes = True
        elif char == ';':
            if not in_quotes:
                # End of segment
                result.append(parse_option(current_segment))
                current_segment = ""
        else:
            current_segment += char
    
    # Handle the last segment if there is one
    if current_segment:
        result.append(parse_option(current_segment))
    
    return result
```