Former US president Barack Obama took aim at "strongman politics" in his highest-profile speech since leaving office.