The real Lorenzo de Medici had no problem conceiving a son. The low-class mother of his illegitimate nephew would be a nameless nobody and definitely not find herself at the head of the Medici family fortune.
The show depicts Giuliano de Medici's son as being the illegitimate result of a one night stand, with Giuliano only discovering he was to be a father as he lay dying. In reality, Giuliano's son, the future Pope Clement VII, was born only a month after Giuliano died. His parents were considered to have been betrothed and so Giuliano's son was considered legitimate.