Thank you for contacting Intel Community. Generally, the NC pins should not be driven any signals. However when the migration feature is enabled in your design, you should always follow the common pin placement as stated in the Quartus Prime software Pin Migration Window in the Pin Planner. Therefore during migration, these NC pins may be connected to power, ground, or a signal trace depending on the common pin migration assignment of the devices selected for migration.
For 10M02SCU169C8G and 10M04SCU169C8G: by referring to the 'Pin Migration View', you can connect the Pin_D2 and Pin_E2 to GND while Pin_D3 to VCCA3.