Preheat the oven to 400°F (200°C). Line a baking sheet with aluminum foil and lightly spray or oil it; set aside.
Place the whole chicken breast-side down on a cutting board. Use poultry shears or a sharp knife to cut out and remove the backbone.
Flip the chicken so the breast is up, press firmly on the breast to flatten the bird (spatchcock). Tuck or turn the legs so the chicken lays flat, then place it open-side down on the prepared baking sheet.
Halve the garlic heads crosswise and place the cut-side down on the baking sheet beside the chicken.
In a small bowl, whisk together lemon juice, olive oil, Italian seasoning, kosher salt, and black pepper to make the marinade.
Brush the marinade evenly over the chicken. Let the chicken sit in the marinade for 30 minutes at room temperature or up to 1 hour in the refrigerator.
Bake the chicken in the preheated oven for 30 minutes.
While the chicken bakes, slice 1 lemon into rounds.
After the initial 30 minutes, remove the chicken from the oven, arrange the lemon slices on top of the chicken, and return it to the oven. Continue roasting for another 15–20 minutes, or until a meat thermometer inserted into the thickest part of the thigh and breast reads 165°F (74°C).
Remove the chicken from the oven and let it rest a few minutes before carving and serving with the roasted garlic and lemon.