Does ground suffer from a voltage drop like effect?
No, it doesn't (but...)
Ground, by definition, is the zero point in a circuit so it can't experience "drop". Ground wires (e.g. connections to ground) are subject to Ohm's Law like any other wire.
This is your circuit as best I understand from your description:
simulate this circuit – Schematic created using CircuitLab
From the Arduino's perspective the ground is a large sheet of copper foil buried inside the circuit board. All determinations of voltage (and therefore logic levels: high/low, 0/1, true/false, etc) derive from comparing the signal potential energy to the potential energy of this foil sheet (which is usually connected, ultimately, to a battery/power source's negative terminal).
Long wires are ok in your application because...
In your question you are concerned with the voltage losses in a ground wire (the wire connecting the leg of the switch to ground). This wire can (and will) develop a voltage as current flows through it (Ohm's law) and so "drop" in your understanding, but this drop is not significant enough to cause problems due to the way the switch circuit is designed:
R3 is typically three orders of magnitude greater than the resistance in the wire pathway through the switch. When the switch is open the resistance is almost infinite and the voltage at the Arduino GPIO node is equal to V1. When SW1 is closed, the resistance between the Arduino GPIO node and ground is now the resistance of the two wires to the switch and the switch itself.
24AWG wire (the kind used in network cables and other small wire systems is about 0.085 Ohms/meter). You could go more than a kilometer before you reach 100 Ohms! Even at these great resistive values, the total resistance in the wire path would be less than 250 Ohms and therefore represent only 2.5% of the total voltage (e.g. still almost 0 and certainly low enough to be read by the Arduino as logic 0).
Not all "grounds" are the same...
The concept of ground is defined for the system. If you have multiple systems there can be differences between their respective grounds.
@Techydude points out several interesting examples of this problem:
long wires in the example above, the ground plane(s) of the PCB, the ground pins of chips, the bond wires between the pins & the silicon die, and the silicon pathways themselves.
This relative relationship to ground occurs because voltage itself is relative. Voltage is the difference in potential energy between two points. "Ground" is just the name given to the second point when all voltages in an analysis are sharing this same second point. If they do not, you will experience (and have to account for) drop in your ground connections.
Well, yes. Ohm's law still applies.
Your long wires have a resistance. If you are passing current through those wires, a voltage will be dropped across the wires: V=I*R.
However, if you have designed your circuit well (and used decent wires), the current is small, and R is small, so the voltage difference isn't too large.
You will have to determine the current yourself; without a schematic we cannot tell if the current will be negligible.
Ground, whether on a wire or on a circuit board, suffers voltage drop as does any other connection. However, if you design the circuit right you need so little current to sense a switch closure that voltage drop is the least of your problems. You need to make sure that noise and transients induced onto your 40m of wire do not get into and damage the processor. For this you will need a simple RC low pass filter on the input to the processor