Hybrid quantum-classical algorithms have been proposed as a potentially viable application of quantum computers. A particular example - the variational quantum eigensolver, or VQE - is designed to determine a global minimum in an energy landscape specified by a quantum Hamiltonian, which makes it appealing for the needs of quantum chemistry. Experimental realizations have been reported in recent years and theoretical estimates of its efficiency are a subject of intense effort. Here we consider the performance of the VQE technique for a Hubbard-like model describing a one-dimensional chain of fermions with competing nearest- and next-nearest-neighbor interactions. We find that recovering the VQE solution allows one to obtain the correlation function of the ground state consistent with the exact result. We also study the barren plateau phenomenon for the Hamiltonian in question and find that the severity of this effect depends on the encoding of fermions to qubits. Our results are consistent with the current knowledge about the barren plateaus in quantum optimization.