For the phones
So far they have been relatively good on this front.
Relatively means - old phones and tablets can be bricked by specific up/down-grades (f.e. there are 3 bootloader updates for my 2012 Nexus 7 which brick it). There is no guarantee that the phone will remain usable after an update (just ask all the people who have rolled back Android 5 to 4 on the older Nexus 7s). It will however continue to be updated for a long time.
Not as good of a record as Apple (credit were credit is due - I am not a fan, but their support record for older hardware is quite good). It is however, the best record in the industry. Sony or Samsung - you get a couple of updates and that is it. Any of the tier 2 manufacturers - you might as well forget it.
This is however, Google's "flagship", there, you will get support and updates, it will not just abandon it because the marketing fallout will be immense. If you are with any other product, especially an acquired one - you are really alone with the wolves.