Whereas the fuses on the Uno are set for a 0.5 kB boot section:
The IDE has a setting where it fails the compilation if the sketch size exceeds the application section on the microcontroller, as determined by the board's upload.maximum_size property. You can see that the Nano and Uno's upload.maximum_size properties are different due to their different boot section sizes:
What this means is that if your sketch uses more than 30720 but less than 32256 bytes of flash memory, the compilation will succeed, but then the upload will fail with a confusing "verification failed" error because the last part of the upload won't be allowed to overwrite the boot section.
You can fix that by connecting an ISP programmer to your Nano and doing a Tools > Burn Bootloader with Tools > Board > Arduino AVR Boards > Arduiino Uno selected. This will set the fuses on the Nano to have a 0.5 kB boot section, freeing up 1.5 kB of precious flash memory for you to use in your sketches!
The two boards have different core variants:
But if you look at the "eightanaloginputs" variant, you'll see there really isn't so much of a difference:
All the code of the "standard" core variant is used by the "eightanaloginputs" variant, it just changes the value of the NUM_ANALOG_INPUTS macro from 6 to 8. The Arduino core library doesn't use NUM_ANALOG_INPUTS at all and I haven't found many uses of it elsewhere. The significant exception is in the Firmata Library.