Following the seminal works of Asorey-Ibort-Marmo and Muñoz-Castañeda-Asorey about selfadjoint extensions and quantum fields in bounded domains, we compute all the heat kernel coefficients for any strongly consistent selfadjoint extension of the Laplace operator over the finite line [0, L]. The derivative of the corresponding spectral zeta function at s = 0 (partition function of the corresponding quantum field theory) is obtained. To compute the correct expression for the a 1/2 heat kernel coefficient, it is necessary to know in detail which non-negative selfadjoint extensions have zero modes and how many of them they have. The answer to this question leads us to analyze zeta function properties for the Von Neumann-Krein extension, the only extension with two zero modes.Mathematics Subject Classification. 81S99, 81T20, 81T55, 81U99, 34B08, 35J25, 11M36, 47B25, 47A10.Keywords. Quantum Theory, Quantum field theory on curved space backgrounds, Casimir effect, Scattering theory, Parameter dependent boundary value problems, Boundary value problems for second-order elliptic equations, Zeta and L-functions: analytic theory, Symmetric and selfadjoint operators, General theory of linear operators.