If nothing is connected it will float to an undefined level and may read high or low.
I'm not sure if INPUT-PULLUP works on the ESP32 but if so, enabling the built-in pull-up will make it read high with nothing connected.
If you connect it to ground it should read low. If you connect it to Vcc it should read high. If you connect it to something else it should read whatever is connected.
P.S.
Normally an I/O pin is used as an input (read) or an output (write). If you write a high (or low) and then you read, it doesn't matter what you wrote because now it's reading the current state.
i suggest you use Serial.readStringUntil() instead. This lets you define a terminator, usually '/n'.
From your output, it never went inside the if (getCmdSerial == "test")
so your getData = digitalRead(35); is just from noise (assuming you connected 27 and 35)