This depends, unfortunately. And it does depend a bit on budget as well.
Electric kettles used for boiling water can leach certain substances.
For plastic the main concern currently is BPA leaching.
What is BPA and Why Should Your Electric Kettle be Plastic Free?
Do the plastic in kettles leach the toxin BPA?
Why Electric Kettles Should Be Plastic Free
Ideally, a good electrical kettle should not contain any plastic because it is loaded with BPA chemical which quickly leaks out when the temperature rises and may cause healthy concerns. BPA is found in polycarbonate, one of the raw material for manufacturing plastics. When consumed, BPA can cause some problems such as disrupting the development of the unborn child or may lead to obesity. Countries such as Japan and Canada, have banned baby bottles and sip cans which containing BPA because of the adverse effects it causes to the users. Also, taking water or tea that tastes plastics is thought to be harmful and could cause serious health problems such as breast cancer, learning disability, and impaired learning. BPA may also cause asthma, prostate cancer, and cardiovascular issues.
But going all metal may be bad as well:
Electric kettles may damage your health, scientists warn
The government is to launch research into whether using boiled water from old-style electric kettles is worsening skin allergies through nickel leaching off exposed elements.
Those who filter their water first might be exposing themselves to the greatest risk. The resulting liquid seems to be more acidic, resulting in greater concentrations of nickel dissolving into the water, although further work is being commissioned on this issue.
On the one hand you have to insist on guarantees from the manufacturer that those problematic substances are not in the product from the beginning. ("BPA-free" or something like that).
But in short: you cannot trust any industry that wants to sell something, as usual in a capitalist society. You have to find a trustworthy independent reviewer that checks for a multitude of possibly dangerous substances in those products in your market. Results can get surprising. Then choose that which best fits the paradigm of least toxic and most affordable to you.