Why multiple macOS installation share settings?

Wi-Fi: Wi-Fi passwords are stored in NVRAM/PRAM if you have ever used Wi-Fi in Recovery mode or for an installation. So both macOS installations can use that.

The output from the Terminal command nvram preferred-networks will include the names of WiFi networks - the passwords are encrypted.

Spotlight: Spotlight indexes and settings are specific to the disk volume. These are stored in the .Spotlight-V100 hidden folder. So preventing Spotlight from searching particular locations is an attribute of the volume and so would be used by both installations.