Is it possible to have conditionals in /etc/rc.local?

The [[ ... ]] syntax isn't valid for /bin/sh. Try:

if [ -e /usr/src/an-existing-file ]
    echo "seen" >> /etc/rclocalmadethis

Note that sometimes it works because /bin/sh -> /bin/bash or some other shell that supports that syntax, but you can't depend on that being the case (as you see here).

You can run ls -l /bin/sh to get to know this info for instance:

lrwxrwxrwx 1 root root 4 Jul 18  2019 /bin/sh -> dash

[[ is a bash feature not available in sh:

[email protected]:/# type [[
[[ is a shell keyword
[email protected]:/# sh
# type [[
[[: not found