My question then: how does geany pick up the environment of the current user?
Same as every Unix program, it is either inherited or specified by its parent.
If Geany (or any program) is started from the command line its parent is bash, which read the .bashrc file and added things you defined there to the environment it passes to programs it starts.
But if Geany (or any program) is started from the menu, it is inheriting the environment of the desktop, which got it from its parent, which varies somewhat but is probably your graphical login manager, which is started by the system startup.
Nowhere in that sequence is there a bash running as your user (so it knows which .bashrc to read).
You need to configure the desktop to run geany as a bash command ie something like `/bin/bash -c geany`.