Is there a maximum size of a scriptSig/scriptPubKey?
10,000 bytes.  See Bitcoin Core source code: https://github.com/bitcoin/bitcoin/blob/v0.17.0/src/script/script.h#L31-L32
https://github.com/bitcoin/bitcoin/blob/v0.17.0/src/script/interpreter.cpp#L299-L300
Note that the EvalScript function only runs when someone tries to spend a script, so it doesn't apply to unspendable outputs like OP_RETURN.  In that case, the consensus rules allow you to include as much data as you want in the output up to the maximum block weight limit.  Bitcoin Core has long placed much more restrictive limits on what transactions it'll relay and mine when they contain OP_RETURN outputs, so we rarely see transactions exceeding those limits.