It doesn't appear that there's a realistic limitation. This example shows creating a test.ini that has more than 30k bytes because it's using a codepoint which encodes each character as 3 bytes:
//var %a $str($chr(10004),$maxlenl) $+ a | if ($isfile(test.ini)) remove test.ini | writeini test.ini section item %a | echo -a $readini(test.ini,section,item) | echo -a $file(test.ini).size
Any problem you encounter will probably relate to the $maxlenl value for the mIRC version trying to run your code, which is 10k now, but up through v7.52 was around 4k-ish.
As long as you're able to get your value string placed into a %variable, you should be able to /writeini it, and should be able to readini it unless you're moving an absurdly long string into a really long variable name.https://forums.mirc.com/ubbthreads.php/topics/265243/maxlenl-chars-vs-bytes
mentions some issues it's possible to encounter unrelated to write/ini/readini, where sometimes $maxlenl is a character limit and sometimes it's the number of bytes. i.e. "//var %a $str($chr(10004),5000) | echo -a $sha256(%a) vs $sha256(%a $+ x)" returns the same hash twice because only the first 100+$maxlenl characters are being hashed so neither is for the 5000 char string, and there's a line-too-long error for "//var %a $regsubex(foo,$str($chr(10004),5000),,,&v) | echo -a $bvar(&v,0)" when the number of characters exceeds 100+$maxlenl, which at the current version is changing 5000 chars to 3447 or higher.