Most use common parts, either regular microcontrollers with on board flash, or for the cheaper older parts in an OTP package, with built in EPROM and no erase window, programmed on a programmer before placing on the board. Generic firmware for a brand, then with a cheap EEPROM chip on the board that has option bits, so you can have different models with the same control board, so you can have a heat pump, cooling only, or any mix of them, and even fancy ones with a separate inverter board outside, communicating over a serial link. all on the same board, just populated with different components as needed.
Once you get into the commercial world you get more sophisticated microcontrollers, but again they stick with the same families of microcontroller, just sometimes with more communications abilities, and with often the ability to expand using other off the shelf parts, like wireless gateways and such, that interface to the microcontroller. Yes it might not be a microcontroller you know, as often the base inside is a derivative of the 8051, complete with a whole host of peripherals, used because the actual IP of the chip is now free, the IDE is free, and it is available from a few fabs with the same pinout, firmware and speeds, and for AC use you really only need the slowest processor. Order 100k parts per quarter kind of manufacture, and all come pre programmed with the particular manufacturer firmware, and a pre programmed option set in EEPROM chip as well.
I know Samsung has used the exact same microcontroller for 2 decades now, just a few board respins, in that they went from having a separate iron core transformer in the case, to a small built in SMPS, with the board being identical both firmware, mounting and use wise, just you remove the transformer. or leave it disconnected in the case, as the sockets are not there any more. Case moulds still have the space for it, and the mounting bosses, but no transformer in there. Set up the option bits for the new board with the remote control, and press power off on it, and power on, and it now works perfectly.