Just to confirm, yes FreePascal/Lazarus can be used on Intel Galileo (Gen 1 and 2), at least when running
Windows IoT. Some tweaks are required on RTL side, however, as even empty Win32 console application tries to link a couple of nonexistent DLL methods from Windows API and crashes silently. Once this is fixed, it is extremely easy to program that board and access its stuff such as GPIO, PWM, etc.
There is also
SD-Card Linux Image for Intel Galileo that you can use (I haven't tried it yet), where accessing GPIO shouldn't be any different than on
Raspberry PI.
Edit: it is also possible to cross-compile to Intel Galileo that is running aforementioned sd-card Linux image. In fact, Raspberry PI applications that use native Linux calls, when recompiled for linux-i386 target, work "out of the box" on Intel Galileo.