The error message is telling you that the string you've output into the value of the input box is not valid.
As is documented, the value of a "date" input must always be specified in yyyy-mm-dd format. This is irrespective of the format in which is it displayed to the user (which is chosen based on the user's browser locale settings).
You can fix it by using the correct PHP date format string, like this:
PHP:
$dia = new DateTime();
$dia->modify( 'previous tuesday' );
$terca = $dia->format('Y-m-d');
<input type="date" name="data" value="<?php echo $terca?>">
Runnable demo of PHP: http://sandbox.onlinephpfunctions.com/code/7045183fd11b5a2e29d5d9fa80f0910cad18d671
Runnable demo of HTML using the string output by the PHP: https://jsfiddle.net/0mqokve6/
P.S. since $dia is already a DateTime object, and format() already outputs a string, wrapping it in the date() function is redundant.
P.P.S. The reason the date control doesn't allow strings in other formats there is always a potential for ambiguity. e.g. dd-mm-yyyy can be impossible to distinguish from mm-dd-yyyy in many cases, such as 01-03-2019 as just one example. In that scenario it's impossible for the browser to know what the intended date was. yyyy-mm-dd is unambiguous and therefore always used to convey the actual value. The user can then be shown it in the format they're more culturally familiar with.