Ambarzumyan‐type theorem with polynomially dependent eigenparameter