It can affect your ability to enter the Schengen area in the future, but it will depend on the country and the officer.
If the person is caught, the penalty depends on national law, so it will depend on where the person is caught. Furthermore, individual officers may differ in their application of national law, even if they are not supposed to. But in the worst case, national law could specify a ban on entry into the Schengen area, and the officer could impose such a ban. The ban could be entered into the Schengen Information System, in which case it should be effective for the entire Schengen area.
The relevant EU laws are
In particular, a condition of entry under the Schengen Borders Code is articulated at 6(1)(d):
they are not persons for whom an alert has been issued in the SIS for the purposes of refusing entry
That is further defined at 2(7):
‘persons for whom an alert has been issued for the purposes of refusing entry’ means any third-country national for whom an alert has been issued in the Schengen Information System (SIS) in accordance with and for the purposes laid down in Articles 24 and 26 of Regulation (EC) No 1987/2006 of the European Parliament and of the Council
For its part, the regulation says in Article 24, Conditions for issuing alerts on refusal of entry or stay, at section (1), that
Data on third-country nationals in respect of whom an alert has been issued for the purposes of refusing entry or stay shall be entered on the basis of a national alert resulting from a decision taken by the competent administrative authorities or courts in accordance with the rules of procedure laid down by national law taken on the basis of an individual assessment. Appeals against these decisions shall lie in accordance with national legislation.
Relevant to your question, it goes on in section (3) to say that
An alert may also be entered when the decision referred to in paragraph 1 is based on the fact that the third-country national has been subject to a measure involving expulsion, refusal of entry or removal which has not been rescinded or suspended, that includes or is accompanied by a prohibition on entry or, where applicable, a prohibition on residence, based on a failure to comply with national regulations on the entry or residence of third-country nationals.